Without a retention policy, your restic repository grows forever. This page explains forget, prune, and how to set up a policy that balances recovery options against storage cost.
Restic never deletes snapshots automatically. You run restic forget with flags that describe which snapshots to keep, and restic marks the rest for deletion. The --prune flag then removes the underlying data in the same command.
Important: restic forget without --prune only removes snapshot references. The data is still in the repository and still uses storage until you run restic prune.
# Minimal: 7 days + 4 weeks
restic forget \
--keep-daily 7 \
--keep-weekly 4 \
--prune
# Standard: daily + weekly + monthly
restic forget \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 6 \
--prune
# Comprehensive: daily + weekly + monthly + yearly
restic forget \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 12 \
--keep-yearly 2 \
--prune
If you back up multiple machines to the same repository, always target forget by host or tag to avoid accidentally pruning another machine's snapshots.
# Forget only snapshots from this host
restic forget \
--keep-daily 7 \
--keep-weekly 4 \
--host $(hostname) \
--prune
# Forget only snapshots with a specific tag
restic forget \
--keep-daily 7 \
--keep-weekly 4 \
--tag production \
--prune
Run forget as part of every backup script so your repository stays clean automatically. Separate prune jobs are only needed if you want to defer the I/O cost of cleanup.
restic backup /etc /var/www /home --tag daily
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --tag daily --prune
restic check
With deduplication, the actual storage of a daily backup policy depends on your change rate. For a typical server with 50GB of data and a 5% daily change rate, 7 daily + 4 weekly snapshots uses roughly 60-80GB. ServerCrate's 100GB Starter plan at $5/month covers most single-server setups cleanly.
ServerCrate enforces a maximum snapshot retention window per plan - 7 days on Free, 30 days on Starter, 60 days on Standard, 90 days on Pro. Your restic forget policy should be set to not exceed these windows, or older snapshots will still count against your storage quota without being accessible from the portal.
Align your forget policy with your plan. For a Standard plan (60-day retention), a policy of --keep-daily 7 --keep-weekly 8 --keep-monthly 2 gives you 8 weeks of weekly snapshots plus 2 monthly snapshots - all within the 60-day window.
This trips up many users. restic forget removes snapshot references from the repository index. But the actual data blocks those snapshots referenced are still physically present in the pack files. Storage is not reclaimed until you run restic prune.
Running restic forget --prune does both in one command. Running restic forget alone is useful if you want to defer the I/O cost of prune to off-peak hours, or if you want to inspect what would be deleted before committing. In practice for most setups, just always pass --prune to forget.
If you back up multiple machines to a single ServerCrate vault - which Standard and Pro plans support - always scope your forget commands by host or tag. Without scoping, forget applies across all snapshots in the repository and may prune snapshots from other machines.
# Safe: scoped to this host only
restic forget --keep-daily 7 --keep-weekly 4 --host $(hostname) --prune
# Dangerous: applies to ALL hosts in the repository
restic forget --keep-daily 7 --keep-weekly 4 --prune
Tag each machine's backups on creation with --tag $(hostname) and then target forget with --tag $(hostname) to keep host-level policies separate and predictable.
restic snapshots before forget to verify what will be kept, or use --dry-run to preview.restic forget --keep-daily 7 --keep-weekly 4 --dry-run. It shows which snapshots would be removed without actually deleting anything.Flat pricing. No per-snapshot fees.
No egress fees, cancel anytime, 7-day money-back guarantee