seafile-gc: online-GC verified, recurring cron design, -r purge results (-277G total)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Julien Lutran
2026-08-27 16:54:50 +02:00
co-authored by Claude Fable 5
parent f6d488c1e9
commit 26ae55163e
+17 -3
View File
@@ -105,9 +105,23 @@ du -sh .../seafile/rootfs/opt/seafile/seafile-data/storage/blocks # was 867 G
file), then `zfs destroy data/containers/seafile@pre-gc`
- re-enable the crontab (incus-copy leg first; its next refresh
transfers the shrunken dataset)
- **schedule GC** so this never regrows: quarterly maintenance window
(offline GC is the CE price); host-side cron via
`incus exec seafile -- ...` or a documented manual ritual
- **recurring GC** (done 2026-08-27 design): the MySQL backend runs
GC *online* (verified — the runs printed "use online GC" and `-r`
ran with services up), so no stop/start is needed. Host crontab:
```cron
# monthly dry-run report (cheap health check, read-only)
0 6 1 * * incus exec seafile -- sh -c "cd /opt/seafile/seafile-server-latest && ./seaf-gc.sh -D" >> /var/log/seafile-gc.log 2>&1
# quarterly real GC: blocks + trashed repos + fs objects
0 6 15 1,4,7,10 * incus exec seafile -- sh -c "cd /opt/seafile/seafile-server-latest && ./seaf-gc.sh && ./seaf-gc.sh -r && ./seaf-gc.sh -R" >> /var/log/seafile-gc.log 2>&1
```
At the post-cleanup scale (~120 k live files) the full sequence is
minutes, not hours. Keep it clear of the 01:00/04:30/05:00 backup
slots.
- 2026-08-27 follow-ups executed: 8 old libraries deleted by user →
trash emptied → `seaf-gc -r` purged their stores (18 m, blocks now
590 G, 277 G total); 4 pre-`GarbageRepos` husks removed manually;
Documents to be recreated from a local re-sync (retires its ~4.9 M
fossil commit objects → expected final ~600 k inodes)
- re-decide seafile's S3 backup with real post-GC numbers:
per-file restic redux if the object count collapses far enough,
`zfs send | restic --stdin-from-command` otherwise