restic-backup: prune tuning (--max-unused 10%, --max-repack-size 4G) with churn-based rationale

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Julien Lutran
2026-08-25 12:14:50 +02:00
co-authored by Claude Fable 5
parent 93450a6fed
commit 3381fe62bf
+10 -4
View File
@@ -171,12 +171,18 @@ restic unlock 2>/dev/null # clear stale locks a
``` ```
- `forget` without `--prune` is instant; actual **prune runs weekly** - `forget` without `--prune` is instant; actual **prune runs weekly**
(Sunday, offset from plakar's check): (Sunday, offset from plakar's check; prune takes an exclusive lock —
never overlap the 05:00 backups):
```cron ```cron
0 14 * * 0 ... restic prune --max-unused 10% --pack-size 64 ... 0 14 * * 0 ... restic prune --max-unused 10% --max-repack-size 4G --pack-size 64 ...
``` ```
`--max-unused 10%` caps rewrite amplification (leaves ≤10 % dead Tuning rationale (our churn: ~0.10.4 GiB/day dead data vs ~700 GiB
data in place instead of rewriting packs eagerly). repos, seafile append-mostly ≈ nothing dies): `--max-unused 10%`
lets prune skip repacking for months, carrying ≤10 % slack in cheap
object storage; `--max-repack-size 4G` bounds any single Sunday's
rewrite to ~1015 min even after a mass deletion, deferring the
rest to following weeks. (`--repack-small` only matters for repos
with legacy sub-64 MiB packs — not us, we start at 64.)
- **Verification**: weekly `restic check` (structure only, cheap) + - **Verification**: weekly `restic check` (structure only, cheap) +
`check --read-data-subset=1/52` rotating — a full data verification `check --read-data-subset=1/52` rotating — a full data verification
of every byte once a year, ~25 GiB read per week, for free. of every byte once a year, ~25 GiB read per week, for free.