Restic retention policy
with forget and prune

Updated November 2026

Without a retention policy a restic repository grows forever. Set forget and prune once and storage stays predictable.

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 is irreversible. Always run forget with --dry-run first to see exactly which snapshots would go.

On this page

How restic forget and prune work

Restic never deletes snapshots on its own. restic forget applies your --keep-* rules; restic prune then deletes the chunks nothing references, which is what frees storage. restic forget --prune does both, or run forget alone to defer prune's I/O to off-peak hours.

This guide works with any restic REST server.
Ours is zero-knowledge and ready in a minute: Standard $9/mo for 1 TB, or $90 a year with yearly billing. 30-day money-back on every paid plan.
Choose Standard, 1 TB

Common retention policies

Most setups use one of three policies, depending on how far back you need to restore: a month, six months or two years. Each block is a complete command; the free retention calculator shows every restore point a policy keeps.

Shell
# 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

Each --keep-* flag keeps the newest snapshot in a time bucket. Flags combine: a snapshot survives if any rule keeps it, so --keep-last works as a safety floor under the calendar rules.

  • --keep-daily <N>:Newest snapshot from each of the last N days that had one.
  • --keep-weekly <N>:Newest snapshot from each of the last N calendar weeks.
  • --keep-monthly <N>:Newest snapshot from each of the last N calendar months.
  • --keep-yearly <N>:Newest snapshot from each of the last N years.
  • --keep-last <N>:The last N snapshots regardless of time. A safety floor.
  • --keep-within 30d:Every snapshot from the last 30 days. Good for compliance windows.
  • --keep-tag <tag>:Never forget snapshots carrying this tag. Use it for legal holds.

Retention on ServerCrate vaults

Every ServerCrate vault has two endpoints on the same repository. The backup endpoint your servers write to is append-only: it can add snapshots but cannot delete or change them, so a compromised host cannot wipe your history.

The maintenance endpoint has full access and its own key; forget and prune run there. Create the key with the Cleanup key button on your vault in the portal. It is shown once.

Run retention from one trusted machine, never from the hosts you back up:

Shell
restic -r rest:https://maint:<maintenance-key>@<vault-id>-maint.vault.servercrate.net/ \
  forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune

Your repository password is the same on both endpoints. The cleanup key only controls who is allowed to delete.

Running prune on a schedule

Schedule forget so the repository stays clean on its own. Weekly prune is the usual balance: daily wastes CPU and locks the repository, monthly lets dead chunks pile up. On ServerCrate, run it from the machine holding the cleanup key.

Storage cost estimates

With deduplication, storage depends on your change rate. A server with 50 GB of data and a 5% daily change rate uses roughly 60 to 80 GB under 7 daily plus 4 weekly snapshots.

The 250 GB Starter plan at $3/month covers most single servers. Longer retention costs less than it looks, because unchanged data is stored only once across all snapshots.

Retention by plan on ServerCrate

Each ServerCrate plan has a maximum snapshot retention window. Keep your forget policy inside it, or older snapshots still count against your quota without being reachable from the portal.

PlanRetention window
Free7 days
Lite14 days
Starter30 days
Standard60 days
Pro90 days
Business180 days

For a Standard plan (60 days), --keep-daily 7 --keep-weekly 8 --keep-monthly 2 gives 8 weekly plus 2 monthly snapshots, all inside the window.

Restic forget with multiple hosts in one repository

If several machines back up to one ServerCrate vault (every plan supports this up to its device limit), always scope forget by host or tag. Without a scope, forget applies to every snapshot in the repository and can prune other machines' history.

Shell
# 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 with --tag $(hostname) when you create them, then target forget the same way. Both scoping styles in full:

Shell
# 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

Next step: your first offsite backup

On a Linux server, our installer does the setup in one line: it installs restic, creates your encryption password on your machine, takes a first snapshot and schedules a daily backup. The Vault page in your portal shows this line with your vault filled in.

Linux, one-line installer
curl -fsSL https://servercrate.net/install.sh | sudo sh -s -- --repo "rest:https://vaultuser:YOUR_TOKEN@a1b2c3d4.vault.servercrate.net/"

Add --dry-run to see what it would do without changing anything. On macOS or Windows, or to do it by hand, follow the setup guide.

Standard holds a NAS share or several servers, with 60 days of history.
Standard $9/mo for 1 TB, or $90 a year with yearly billing. 30-day money-back on every paid plan. Or start with 10 GB free, no card.
Choose Standard, 1 TB

Restic retention policy FAQ

For most homelab and SMB workloads, --keep-daily 7 --keep-weekly 4 --keep-monthly 12 covers nearly every restore scenario. Add --keep-yearly 7 for compliance. Beyond that, storage cost grows while a 13-month-old snapshot adds little value.
forget marks snapshots as deletable based on your retention policy. prune reclaims the storage by removing chunks no surviving snapshot references. They are separate 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.

Further reading

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.

A retention policy only protects you if the repository host cannot be pruned by an attacker; our comparison of restic hosts shows which ones support append-only.

Keep going

Start backing up with the right retention.

Flat pricing. No per-snapshot fees.

Need more than 10 GB? Starter is 250 GB for $30/yr, and every plan keeps the same vault and key when you move up.

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