Snapshots
conceptA snapshot freezes a dataset at a moment in time, so you can look at— or return to—exactly how things were. The word sounds like a photograph: a duplicate, costing what the data costs. Actually, a ZFS snapshot copies nothing. Because ZFS never writes over existing data anyway, everything the dataset looked like a moment ago is already sitting on disk. A snapshot is just a name attached to that moment, plus a promise: don't throw any of this away while I'm holding it. Taking one is instant and free, no matter how much data is involved.
The cost is deferred, not absent: it builds up slowly, as the live data drifts away from the kept moment and the old pieces can't be thrown out.
Living with them:
zfs snapshot tank/services/postgres@before-upgrade—the@namesuffix is the whole syntax. Instant, safe, take one before anything risky.zfs list -t snapshotto see them;zfs list -o spaceto see what they're costing (theUSEDSNAPcolumn)—the number that explains the mystery in Snapshots and Disappearing Space.- Read the past without commitment: every dataset hides a
.zfs/snapshot/<name>/directory—the snapshot's contents, browsable read-only. Copy one file back out of last Tuesday without any rollback drama. - At scale you don't take snapshots by hand; a policy tool (sanoid) takes hourlies/dailies/monthlies and prunes them. Snapshots are cheap; keeping every snapshot forever is how pools quietly fill.
The three relatives, kept distinct:
- Rollback—makes a snapshot the present again, by destroying everything since it. Demolition, not navigation (its node carries the warning).
- Clone—a writable dataset branched off a snapshot, sharing blocks. The nondestructive way to revisit or experiment with the past.
- Send/receive—a snapshot is also the unit of replication: sends ship exact snapshot states between pools.
And the confusion that owns its own node because it matters most: a snapshot is not a backup. It's on the same disks, in the same pool, behind the same mistakes. Versioning, not protection.