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.
A restic retention policy is a set of --keep-* rules that decide which snapshots survive when you run restic forget. Restic never deletes anything on its own, so without a policy a repository grows for as long as you keep backing up. A working policy for most homelab and small-business setups is restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --keep-yearly 1 --prune. That keeps every day of the last week, one snapshot per week for a month, one per month for half a year, and one per year beyond that.
Two commands do different jobs. forget removes snapshot references and is instant and reversible until you prune. prune reclaims the actual disk space by deleting unreferenced data chunks, takes far longer, and cannot be undone. Always run forget with --dry-run first to see exactly which snapshots would go.
Retention only decides what to keep. Proving those snapshots are readable is a separate job — see how to verify restic backups — and if you want the whole thing running unattended, a systemd timer handles scheduling without cron.
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 200GB 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.
Flat pricing. No per-snapshot fees.
Cancel anytime. 10 GB free tier never expires. No egress fees.
10 GB. No credit card. Setup in 5 minutes. Card, PayPal, or Bitcoin when you upgrade.
Start free vault →