From c358e0dfea4d541296d3a1c9e976e31bc15241d3 Mon Sep 17 00:00:00 2001 From: majorlinux Date: Sun, 21 Jun 2026 12:33:56 -0400 Subject: [PATCH] restic runbook: document the snapshot-group-per-path-set gotcha Changing a host's restic_paths spawns a new snapshot group (restic groups by host+paths), so old and new path-sets each keep their own retention lineage. Surfaced while extending majorlab's backup scope. --- 02-selfhosting/storage-backup/restic-b2-fleet-backups.md | 1 + 1 file changed, 1 insertion(+) diff --git a/02-selfhosting/storage-backup/restic-b2-fleet-backups.md b/02-selfhosting/storage-backup/restic-b2-fleet-backups.md index 6694870..169a089 100644 --- a/02-selfhosting/storage-backup/restic-b2-fleet-backups.md +++ b/02-selfhosting/storage-backup/restic-b2-fleet-backups.md @@ -128,6 +128,7 @@ To recover a database, restore the dump then load it: `mysql < mysql-.s - **Exclude data that's already offsite.** Media already synced to object storage (S3/B2 via the app or `rclone`) should be `--exclude`d so you don't pay to store it twice. - **First upload is slow, the rest are fast.** The initial snapshot reads and uploads everything; subsequent runs only ship changed blocks. For a large first run, fire it detached and watch from a transient unit that emails you on completion. - **Keep secrets out of git.** The repo password and B2 key belong in an Ansible vault (committed encrypted), referenced into the role — never in plaintext vars. +- **Changing a host's backup paths starts a new snapshot group.** `restic forget` groups snapshots by `host`+`paths` by default, so adding or removing a path on an existing host creates a *separate* lineage: the old path-set and the new one each retain their own 7d/4w/6m snapshots, and `restic snapshots` shows both. Expected, not a bug — but it means the old-path snapshots age out on their own schedule rather than being superseded. To collapse everything into one retention bucket, run `forget` with `--group-by host` (be deliberate: it then treats *any* path-set on that host as the same group). ## See Also