Pcornel
Storage · Snapshots

Snapshot Retention

Cheat sheet · https://pcornel.dk/topic.php?topic=4227

Back to the Topic

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.

Remember

  • 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.

First 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

Commands

zfs snapshot [-r] dataset@name
zfs destroy -r dataset@snap
zfs list -o space
zfs send

Verify in this order

schedule → create → prune by policy

Where it usually breaks

First mismatch in source consistency → capture/journal → transport → repository/replica → catalog/checkpoint → restore/failover read-back; preserve identity/pre-state before mutation.

Snapshots → Snapshot Retention proof map

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

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4227

Confirmation

Confirm action

Continue?