Displaying and Accessing ZFS Snapshots
By default, snapshots no longer appear in the zfs list output. You must use the zfs list -t snapshot
command to display snapshot information. You can also enable the listsnapshots pool property instead. For example:
$ zpool get listsnapshots system1 NAME PROPERTY VALUE SOURCE system1 listsnapshots off default $ zpool set listsnapshots=on system1 $ zpool get listsnapshots system1 NAME PROPERTY VALUE SOURCE system1 listsnapshots on local
Snapshots of file systems are placed in the .zfs/snapshot
directory within the root of the file system. For example, if
system1/home/kaydo is mounted on
/home/kaydo, then the
system1/home/kaydo@thursday snapshot data is accessible in
the /home/kaydo/.zfs/snapshot/thursday directory.
$ ls /system1/home/kaydo/.zfs/snapshot
thursday tuesday wednesdayThe following examples shows how to list snapshots.
$ zfs list -t snapshot -r system1/home
NAME USED AVAIL REFER MOUNTPOINT
system1/home/kaydo@tuesday 45K - 2.11G -
system1/home/kaydo@wednesday 45K - 2.11G -
system1/home/kaydo@thursday 0 - 2.17G -The following example shows how to list snapshots that were created for a particular file system.
$ zfs list -r -t snapshot -o name,creation system1/home
NAME CREATION
system1/home/kaydo@tuesday Fri Aug 3 15:18 2012
system1/home/kaydo@wednesday Fri Aug 3 15:19 2012
system1/home/kaydo@thursday Fri Aug 3 15:19 2012
system1/home/glori@today Fri Aug 3 15:24 2012
system1/home/hsolo@today Fri Aug 3 15:24 2012