Use it when configuring, checking or troubleshooting Retention in Backup.
Retention
Retention is a recoverability timeline over concrete restore points and dependencies, not only a number configured in a job.
1. Retention decides how long backups are kept.
2. Driven by business, legal and ransomware dwell time.
3. GFS tiers.
4. Prune and garbage collect.
5. Immutable period ≥ dwell time.
policy → prune → GC
Context & applicabilityCommon mistakes · platform/version boundaries
- Retention shorter than the time to discover a problem (ransomware dwell time, slow corruption).
- Keeping everything forever, conflicting with GDPR deletion requirements.
- Immutable retention set longer than intended — it cannot be shortened.
- Retention in restore points vs days misunderstood when jobs run several times per day.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checking retention Verify boundary
- Count restore points per job and compare with the policy.
- Confirm the oldest restore point date in each repository and copy target.
- Check immutability end dates on object storage (
aws s3api get-object-retention). - Verify GFS points exist for the expected weeks/months.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Configured retention ≠ retained usable restore points; catalog age ≠ underlying data availability.
- Retention state or job status proves only its own boundary; it does not automatically prove end-to-end recoverability.
- A current green status does not prove historical restore points, alternate failure domains or future recovery behavior.
- Recovery evidence is strongest when the original protected data or service can be read back and validated after the intended recovery action.
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --dry-run— previewproxmox-backup-manager prune-job list— PBS prune jobsbackup policy document— retention rules
ReferenceWhat it is1 section · depth on demand
Example retention
| Tier | Daily | Weekly | Monthly | Yearly |
|---|---|---|---|---|
| Critical | 30 | 8 | 12 | 7 |
| Standard | 14 | 4 | 6 | — |
| Test/dev | 7 | — | — | — |
Retention must satisfy legal requirements (bookkeeping, healthcare) and GDPR deletion duties. Longer retention on immutable storage costs more; keep long-term copies in cheaper tiers.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Retention is a policy, written down and enforced by a tool
A retention policy answers: how far back can we restore, at what granularity, and for how long must copies be kept (legal, contractual, ransomware recovery)?
Example with restic
$ restic forget --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 3 --dry-run
Applying Policy: keep 7 daily, 5 weekly, 12 monthly, 3 yearly snapshots
keep 27 snapshots:
...
remove 14 snapshots:
...
$ restic forget --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 3 --prune
The restic documentation describes the policy options and behaviour:
| Behaviour | Detail |
|---|---|
--keep-daily/weekly/monthly/yearly n | Keep the newest snapshot for each of the last n periods that contain a snapshot |
--keep-last n | Keep the n newest snapshots |
--keep-within 2y5m | Keep everything within that duration of the newest snapshot |
| A snapshot is kept if any rule matches | Rules add up; they do not compete |
| Grouping | By default per host and paths, so unrelated backup sets are evaluated separately |
forget alone | Removes snapshot references; --prune (or prune) actually frees repository space |
Always dry-run a new policy — the output shows exactly which snapshots would go.
Design checklist
| Question | Why |
|---|---|
| Oldest restore point required? | Sets monthly/yearly counts |
| Longest time an infection or corruption may go unnoticed? | Short retention can expire all clean copies |
| Append-only/immutable target? | restic recommends --keep-within there, because injected snapshots can push out real ones with count-based rules |
| Who may change the policy? | Retention change is a destructive operation |
*The restic keep and remove counts illustrate a policy dry run, not the contents of a real backup repository.*
Worked example
Retention defines how long restore points are kept. Capacity needed ≈ fulls kept × full size + incrementals kept × daily change, before data reduction.
Example: 10 TB source, 2 % daily change, 30 daily incrementals plus 4 weekly fulls: 4 × 10 TB + 30 × 0.2 TB = 46 TB raw. With synthetic fulls on block-cloning storage or deduplication, the real footprint is much lower — measure it after the first retention cycle instead of trusting the estimate.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Backup → Retention. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://restic.readthedocs.io/en/stable/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Backup → Retention protection/recovery map
Fast scope, recovery-state, failure-boundary and acceptance checks for Backup → Retention.
| Protection / recovery boundary | What to verify | Proof limit |
|---|---|---|
| Scope / objective | Correct protected service, data, dependencies and recovery target | Configuration or policy alone does not prove recoverability |
| Recovery state | Usable restore point, payload, metadata/catalog, keys and repository access | Presence or green job status does not prove successful recovery |
| Failure boundary | Configured retention ≠ retained usable restore points; catalog age ≠ underlying data availability. The backup boundary is proven only when a selected restore point survives the protected failure scenario and can be restored and validated. | Correlate evidence for the same restore/failover attempt and time window |
| Acceptance | Healthy evidence for Retention: the intended protected scope and recovery point are identifiable, required payload/metadata/keys are readable, and the documented restore path produces data or system state that passes the defined validation. | Close only after original workload/data validation and protection restoration |