Restic retention simulator

Preview which snapshots a retention policy keeps, with a reason for each decision. The simulator reads your supplied JSON without opening a restic repository.

Group snapshots by
Keep Last
Keep Daily
Keep Weekly
Keep Monthly
Keep Yearly

Choose snapshot groups and retention periods

Start with a JSON array of snapshot records, not an object containing a snapshots property. The simulator accepts 1 to 1,000 records. Each needs a unique id and an ISO date and time in time. Use restic's hostname field; the older host spelling also works. paths and tags are optional arrays of strings.

Choose one grouping field: host, paths, or tags. Each group receives its own retention calculation. This tool's host-only default is not a statement about the defaults of your installed restic command.

Set an IANA timezone before comparing daily or weekly decisions. Calendar boundaries follow that timezone, and weeks start on Monday. An unrecognized nonempty timezone produces a warning and uses UTC instead.

Each keep count accepts a whole number from 0 to 365. Zero turns that rule off; at least one rule must be active. The retained set is the union of all active rules, so a snapshot stays if any rule selects it. When a calendar rule finds fewer occupied periods than requested, the model also retains the oldest snapshot in that group.

Invalid JSON, duplicate IDs, invalid times, or an all-zero policy prevent a result. Editing clears the old trace, so preview the policy again after a correction. A row marked pruned means no implemented rule selected it. Nothing has been deleted.

Snapshot input stays in this tool's browser memory. It is not sent to a server or saved in a URL or browser storage. Copying a trace is an explicit clipboard action.

Calendar counts versus elapsed windows

A daily retention count is not an age cutoff. Empty calendar periods do not use up the count: the rules work back through periods that contain snapshots. The restic retention documentation explains this distinction and how retention rules combine.

Policy conceptWhat it countsBoundary
Keep lastIndividual snapshots, newest firstApplied separately to each selected group
Daily, weekly, monthly, yearlyOccupied calendar periods, selecting the newest snapshot in eachUses the selected timezone; empty periods do not consume a count
Keep withinAn elapsed retention windowNot implemented by this simulator

Verify the policy against your repository

This is a bounded retention model, not a restic command runner. It omits hourly rules, keep-within rules, tag selectors, and combined grouping keys. It cannot estimate reclaimed bytes because it does not inspect repository data or shared file content.

Before changing retention, compare the trace with restic forget --dry-run using your intended grouping and installed restic version. Review the selected snapshots before running a command that changes the repository. The simulator neither forgets snapshots nor prunes stored data.