I have a ZFS dataset which gets hourly snapshots taken. Yesterday, a change was made to some of the files which needs to be reverted; however, the dataset has ongoing changes which shouldn't be reverted.
What are my options to access the snapshot without disturbing the current copy of its data? Can I mount a snapshot in read-only mode to a new mount point?
Best Answer
It's been a while since I played with zfs, but you should be able to use
zfs list -t snapshot
to find your available snapshots and access the files under a special.zfs
directory under your zfs mountpoint.IIRC, snapshots are already read-only, so attempts to change data in the snapshot directory should fail. If the data changes in the real fs, the snapshot should grow, as it copies the pre-changed data to keep the snapshot consistent.
You would need to
zfs clone
the snapshot to a new location, in order for you to make edits to the snapshot (at which point, it wouldn't be the snapshot any more).As I said, though, it's been a while, so test first...
ref: http://www.googlux.com/zfs-snapshot.html