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.
Snapshot Retention
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.
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.
schedule → create → prune by policy
Context & applicabilityCommon mistakes · platform/version boundaries
Retention compliance shows required snapshot points currently exist under the configured policy, not that they are independently recoverable or application-consistent.
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 Verification path Verify boundary
retention policy → snapshot schedule → retained points → changed-data growth → capacity threshold → expiry/delete/merge → recovery-point verification
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.
- 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.
zfs list -t snapshot -o name,creation— agessanoid --monitor-snapshots— policy complianceGet-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
| Tier | Keep | Purpose |
|---|---|---|
| Hourly | 24–48 | Quick "undo" for users |
| Daily | 14–31 | Recent recovery points |
| Weekly / monthly | 4–12 | Longer 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.
Quick reference
Retention defines how many snapshots to keep and for how long, usually in tiers:
| Tier | Example |
|---|---|
| Frequent | Every 15 min, keep 4 |
| Hourly | Keep 24 |
| Daily | Keep 7 |
| Weekly | Keep 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
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 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%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
Snapshots → Snapshot Retention proof map
Fast identity, dependency, failure-boundary and acceptance checks for Snapshots → Snapshot Retention.
| Storage boundary | What to verify | Proof limit |
|---|---|---|
| Identity / state | Correct object, source/target or snapshot point and same-window timestamps | Inventory alone does not prove data correctness |
| Dependency path | Snapshot mapping/chain, active write target, capacity and backing storage | A healthy adjacent component is not end-to-end proof |
| Failure boundary | Retention 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 |
| Acceptance | Healthy 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 |