From 3381fe62bfc0fa3cc5ec99d149db268545fefed4 Mon Sep 17 00:00:00 2001 From: Julien Lutran Date: Tue, 25 Aug 2026 12:14:50 +0200 Subject: [PATCH] restic-backup: prune tuning (--max-unused 10%, --max-repack-size 4G) with churn-based rationale Co-Authored-By: Claude Fable 5 --- ks4/restic-backup.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ks4/restic-backup.md b/ks4/restic-backup.md index 679a4fe..ca3face 100644 --- a/ks4/restic-backup.md +++ b/ks4/restic-backup.md @@ -171,12 +171,18 @@ restic unlock 2>/dev/null # clear stale locks a ``` - `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 - 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 - data in place instead of rewriting packs eagerly). + Tuning rationale (our churn: ~0.1–0.4 GiB/day dead data vs ~700 GiB + 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 ~10–15 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) + `check --read-data-subset=1/52` rotating — a full data verification of every byte once a year, ~25 GiB read per week, for free.