How to configure restic forget
and keep your storage sane

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.

How restic retention works

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.

Common retention policies

# 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

What each flag means

  • --keep-daily <N>:Keep the most recent snapshot from each of the last N days that had at least one snapshot.
  • --keep-weekly <N>:Keep the most recent snapshot from each of the last N calendar weeks.
  • --keep-monthly <N>:Keep the most recent snapshot from each of the last N calendar months.
  • --keep-yearly <N>:Keep the most recent snapshot from each of the last N years.
  • --keep-last <N>:Always keep the last N snapshots regardless of time. Useful as a safety floor.
  • --keep-within 30d:Keep all snapshots within the last 30 days. Good for compliance windows.

Targeting by host or tag

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

Running prune on a schedule

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

Storage cost estimates

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.

Retention by plan on ServerCrate

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.

The difference between forget and prune

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.

Restic forget with multiple hosts in one repository

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.

FAQ

Common questions.

For most homelab and SMB workloads, --keep-daily 7 --keep-weekly 4 --keep-monthly 12 covers 99 percent of restore scenarios. Add --keep-yearly 7 if you have compliance requirements. There is no benefit to keeping more snapshots than this; storage cost grows linearly while the marginal value of a 13-month-old snapshot is near zero.
forget marks snapshots as deletable based on your retention policy. prune actually reclaims the storage by removing chunks that no surviving snapshot references. They are separate operations on purpose -- forget is fast and safe, prune is expensive and locks the repository.
Weekly is the standard. Daily prune wastes CPU and slows backups because the repository is locked during prune. Monthly prune lets dead chunks accumulate and wastes storage. Weekly is the sweet spot for most workloads.
Yes, with --tag and --group-by host,paths. You can retain longer for tagged-as-important snapshots and shorter for everything else. Use this to keep production backups for a year and dev backups for a month in the same repository.
Until you run prune, nothing is permanently lost -- you can re-add the snapshot ID back to the keep set. Once prune runs, the chunks that only that snapshot referenced are gone. Always test forget with --dry-run before running for real.
Get started today

Start backing up with the right retention.

Flat pricing. No per-snapshot fees.

Cancel anytime. 10 GB free tier never expires. No egress fees.

Next steps
How we protect your data
Zero-knowledge encryption, ZFS isolation, what we log
Who runs ServerCrate
Operating commitments, where data lives, transparency
First backup in 5 min
Sign up, init vault, run your first Restic backup
Try it before you decide

Encrypted Restic vault, free forever

10 GB. No credit card. Setup in 5 minutes. Card, PayPal, or Bitcoin when you upgrade.

Start free vault →
All 5 plans

Flat monthly pricing. No egress fees.

  1. Free10 GB · forever
  2. Starter200 GB · $5/mo
  3. Standard1 TB · $15/mo
  4. Pro2 TB · $29/mo
  5. Business5 TB · $79/mo
See full pricing →