Rollback
procedureOther tools teach a seductive model of time travel: the timeline is a
scrubber bar—jump back to Tuesday, look around, jump forward again,
nothing lost. Actually, zfs rollback is demolition, not navigation:
making Tuesday the present destroys everything after Tuesday—all the
data since, and every later snapshot. Permanently. There is no jumping
forward again, because forward no longer exists.
⚠ DESTRUCTIVE—verify before running. The -r flag doesn't protect
later snapshots; it confirms their destruction (rollback to a non-latest
snapshot refuses to run without it—the refusal is the safety, the flag
disarms it). Semantics per zfs-rollback(8).
The decision procedure, because the destructive verb is usually the wrong one:
- Want one file from the past? Copy it out of the hidden
.zfs/snapshot/<name>/directory. Nothing is destroyed; this is most restores. - Want to inspect or experiment with the past?
zfs clone tank/ds@tuesday tank/ds-tuesday—a writable branch sharing blocks, costing nearly nothing. Look around, take what you need, destroy the clone. - Certain the present is worthless? That's rollback's one legitimate
case:
zfs rollback tank/ds@tuesday. Before running it, say out loud what dies: all data since Tuesday, and every snapshot after it (-rto acknowledge). If saying it caused hesitation, take a snapshot of now first—snapshots are free, and future-you may want to inspect the wreckage.