Every few months I catch myself saying “the data is safe, we have snapshots,” and every few months I have to remind myself that this sentence is only half true. This post is the reminder, written down so future me can just read it.
What a snapshot is
A ZFS snapshot is a frozen, read-only view of a filesystem at a moment in time. It costs almost nothing to create because it doesn’t copy data - it just stops the old blocks from being freed when files change.
zfs snapshot tank/data@2026-05-17
zfs list -t snapshot
zfs rollback tank/data@2026-05-17 # destructive, careful
Made a mess of a directory? Roll it back, or just copy the good files out
of the snapshot’s hidden .zfs directory. For “oops” recovery measured in
minutes, nothing beats it.
What a snapshot is not
A snapshot lives on the same pool, on the same disks, in the same box. If the pool dies, the snapshots die with it, holding hands. A snapshot also faithfully preserves corrupted or encrypted data - it protects you from your own mistakes, not from hardware failure or malware.
So the rule in this house is:
- Snapshots are for undo: hourly for a day, daily for a month, automated with a pruning script.
- Backups (restic, off the box, one copy offsite) are for disaster.
Two different tools for two different bad days. Whenever I hear myself blurring them together, I come back and read this post.