Retention and Cleanup Cheatsheet
# preview retention changes (always)
restic snapshots
# preview retention changes
restic forget --keep-daily 7 --keep-weekly 4 --dry-run
# apply retention and reclaim space
restic forget --keep-daily 7 --keep-weekly 4 --prune
# verify after retention
restic snapshots
restic check
# remove stale locks
restic unlock
# integrity checks
restic check
restic check --read-data-subset=10%
Common Gotchas
| Gotcha | What happens | Fix |
|---|---|---|
Forget without --dry-run | you remove snapshots you still need | always preview first |
| Retention too aggressive | rollback window disappears | start small, expand later |
| Unlock while a job is running | can corrupt backup process | confirm no active process first |