HOWTO: Using ZFS Snapshots

Posted on the July 13th, 2007 under HOWTOs,Sys Admin,Technology / Computing by Joshua Glemza

So the time has come that you’d like to protect the current status of your drive and be able to revert back to this state in the future if something bad happens. Enter snapshots.
root@ufuk:~# zfs snapshot shet@13july2007
And now you have it. You have a snapshot of your data. You can see the size of the snapshot by running:
root@ufuk:~# zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT
shet                     266G   649G   266G  /shet
shet@13july2007          103K      -   266G  -
syspool                 2.77G  32.9G    24K  none
syspool/rootfs          2.77G  32.9G  2.60G  legacy
syspool/rootfs@default   178M      -   648M  -
The size of the snapshot will grow as things change. To recover files from a snapshot, mount it and copy it out of the snapshot.
root@ufuk:~# zfs mount shet@13july2007 /mnt/snapshet
To delete a snapshot, run:
root@ufuk:~# zfs destroy shet@13july2007

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


*