Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

Snapshot Retention

Direct answer

Retention consumes space as active data diverges from retained states. The usable policy must balance recovery-point coverage with snapshot reserve, metadata scale, chain depth and operational deletion/merge windows.

When to use this

Use it when the storage-protection question has been narrowed to Snapshots → Snapshot Retention. Preserve object identity, timestamps, dependency state and the newest authoritative data before changing configuration, deleting snapshot state, resynchronizing or changing replication ownership.

First 30 seconds

1. Retention defines how many snapshots and for how long.

2. Hourly/daily/weekly tiers.

3. Automate pruning.

4. Space vs recovery points.

5. Alert on missing or excess snapshots.

Operational verification

schedule → create → prune by policy

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Failure and recovery traps

Retention compliance shows required snapshot points currently exist under the configured policy, not that they are independently recoverable or application-consistent.

Platform / version applicability
Data protection and recovery
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformData protection and recovery
Scope / prerequisiteUse it when the storage-protection question has been narrowed to Snapshots → Snapshot Retention. Preserve object identi…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

retention policy → snapshot schedule → retained points → changed-data growth → capacity threshold → expiry/delete/merge → recovery-point verification

Evidence references

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.

observation · 1
Key points
  • Retention count ≠ recovery capability.
  • Old snapshots can retain unexpectedly large amounts of changed data.
  • Policy configured ≠ deletion actually occurring.
  • More snapshots ≠ better protection without restore and failure-domain planning.
Key checks
  • zfs list -t snapshot -o name,creation — ages
  • sanoid --monitor-snapshots — policy compliance
  • Get-VMSnapshot -VMName * | ? CreationTime -lt (Get-Date).AddDays(-3) — old checkpoints
ReferenceImportant terms & boundaries3 sections · depth on demand

Scope and what the checks show

Retention compliance shows required snapshot points currently exist under the configured policy, not that they are independently recoverable or application-consistent.

In depth

Snapshot retention: decide how many, how old, and how they expire

zfs-snapshot(8) documents zfs snapshot [-r] dataset@name, with -r taking atomic snapshots of all descendants at the same moment. Its examples include a rolling scheme that retires the oldest snapshot with zfs destroy -r dataset@snap.

# zfs snapshot -r tank/home@daily-$(date +%F)
# zfs list -H -t snapshot -o name -s creation -r tank/home | grep '@daily-' | head -n -14 | xargs -r -n1 zfs destroy
# zfs list -t snapshot -o name,used,creation -s creation tank/home | tail -3
NAME                         USED  CREATION
tank/home@daily-2026-11-25   1.2G  Wed Nov 25  0:00 2026
tank/home@daily-2026-11-26   980M  Thu Nov 26  0:00 2026
tank/home@daily-2026-11-27     0B  Fri Nov 27  0:00 2026

The pipeline keeps the newest 14 daily snapshots. In production, tools such as zfs-auto-snapshot, sanoid or the array's snapshot schedule do this with safeguards.

Typical tiered schedule

TierKeepPurpose
Hourly24–48Quick "undo" for users
Daily14–31Recent recovery points
Weekly / monthly4–12Longer local history

Cost of retention

Snapshot space is the data changed since each snapshot. High-churn data (databases, VM images, build caches) makes long retention expensive. zfs list -o space shows USEDSNAP per dataset.

Rules

  • Expire automatically. Manual snapshots are the ones that are forgotten.
  • Exclude scratch data from snapshot schedules.
  • Local snapshots are not off-site protection. Replicate them (zfs send), and keep longer retention on the backup side.
  • Guard retention jobs: a bug in a destroy script can delete all snapshots, so test the selection with a dry run first.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

Retention defines how many snapshots to keep and for how long, usually in tiers:

TierExample
FrequentEvery 15 min, keep 4
HourlyKeep 24
DailyKeep 7
WeeklyKeep 4

Space used by snapshots grows with the change rate × retention, so a busy database volume with long retention can hold more data in snapshots than live data.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docData protection and recovery current

Authoritative/upstream documentation reviewed for bounded claims in Snapshots → Snapshot Retention. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://openzfs.github.io/openzfs-docs/man/master/8/zfs-snapshot.8.html · confidence 94%
Terminology layer

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.

Aliases that resolve here
snapshot retentionsnapshot-retentionsnapshots snapshot retention
Embedded reference data

Quick lookup tables

Snapshots → Snapshot Retention proof map

Fast identity, dependency, failure-boundary and acceptance checks for Snapshots → Snapshot Retention.

Storage boundaryWhat to verifyProof limit
Identity / stateCorrect object, source/target or snapshot point and same-window timestampsInventory alone does not prove data correctness
Dependency pathSnapshot mapping/chain, active write target, capacity and backing storageA healthy adjacent component is not end-to-end proof
Failure boundaryRetention compliance proves required snapshot points currently exist under the configured policy, not that they are independently recoverable or application-consistent.Correlate evidence for the same operation and time window
AcceptanceHealthy evidence for Snapshot Retention: the expected point-in-time mapping and dependency chain are intact, required backing data is readable, and the intended snapshot lifecycle action completes with correct current-data read-back.Close only after original read-back/recovery test and protection-state verification
Confirmation

Confirm action

Continue?