Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/installation/components/ofelia.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ By default, `ofelia.yml` adds labels to the `seatable-server` service. These lab
| Slug | Description | Schedule |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `clean-tmp` | Removes any files older than 3 days from the `/tmp` directory inside the container to the system from running out of disk space | `@weekly` |
| `gc` | Runs the [garbage collection](../../maintenance/storage-cleanup.md) process to clean up unused blocks | `@weekly` |
| `gc` | Runs the [garbage collection](../../maintenance/storage-cleanup.md) process to clean up unused `block` and `fs` objects | `@weekly` |
| `seaf-fsck` | Runs the [`seaf-fsck`](../../maintenance/filesystem-check.md) script to check the integrity of all Seafile libraries | `@weekly` |

You are free to modify the schedule of these commands and/or add your own commands via additional labels on the `seatable-server` container.
Expand Down
22 changes: 20 additions & 2 deletions docs/maintenance/storage-cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ To release the storage space occupied by unused blocks, you have to run a **garb

Add the following lines to `seafile.conf` to keep deleted files for only 60 days:

```
```ini
[history]
keep_days = 60
```

The value of `keep_days` can have a significant impact on the number of objects stored on the filesystem or in S3.
A lower value of `keep_days` will allow the garbage collector to remove more objects, reducing the storage requirements as well as the number of objects.

## Dry-run mode

To see how much garbage can be collected without actually removing any garbage, use the **dry-run** option:
Expand Down Expand Up @@ -66,6 +69,21 @@ Done.

Run a garbage collection program without adding --dry-run option to actually remove garbage block.

```
```bash
docker exec seatable-server /opt/seatable/scripts/seatable.sh gc
```

### Removing FS Objects

SeaTable uses Seafile to store assets that have been uploaded to bases. Internally, Seafile uses a [data model](https://manual.seafile.com/13.0/develop/data_model/) similar to Git, which consists of `commit`, `fs` and `block` objects.
By default, `seatable.sh gc` will only remove garbage or unreferenced `block` objects. Objects of type `fs` (filesystem) won't be removed.

You can add the `--rm-fs` commandline option to also remove garbaged or unreferenced `fs` objects:

```bash
docker exec seatable-server /opt/seatable/scripts/seatable.sh gc --rm-fs
```

!!! note "Ofelia add this commandline option by default"

If you use the included [Ofelia](../installation/components/ofelia.md) configuration to run the GC process, the `--rm-fs` flag is added by default.