How can I access the contents of a ZFS snapshot without affecting its current data?
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.
[~]# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
mypool 1.49G 527M 528M /mnt/zfspool
mypool@snap1 28K - 993M -
mypool@snap2 28K - 993M -
mypool@snap3 28K - 993M -
[~]# cd /mnt/zfspool/.zfs/snapshot/snap1
[snap1]# ls
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