Accessing a Hidden Filesystem Snapshot Directory (CLI)

Use the following procedure to access filesystem snapshots over data protocols at .zfs/snapshot in the root of your filesystem.

The .zfs/snapshot directory contains a list of all snapshots on the filesystem. The snapshots can be accessed just like normal filesystem data, but are read-only. By default, the .zfs directory is not visible when listing directory contents, but it can be accessed by explicitly looking it up. This prevents backup software from inadvertently backing up snapshots in addition to new data.

  1. In a terminal window, go to the directory where you mounted the share.
  2. Look up .zfs/snapshot.

    From here, you can list snapshots of this filesystem, and look at the contents of each snapshot.

Example 6-1 Accessing .zfs/snapshot

In this example, there are two snapshots of a filesystem. The first snapshot contains three files.

$ ls -1 /mnt/demo
$ ls -1 /mnt/demo/.zfs/snapshot
demo_snap1
demo_snap2
$ ls -1 /mnt/demo/.zfs/snapshot/demo_snap1
file1
file2
file3