tail head cat sleep
QR code linking to this page

Manual Pages  — ZFS-SNAPSHOT

NAME

zfs-snapshot – create snapshots of ZFS datasets

CONTENTS

SYNOPSIS


zfs snapshot [-r] [-o property=value ]… dataset@snapname…

DESCRIPTION

All previous modifications by successful system calls to the file system are part of the snapshots. Snapshots are taken atomically, so that all snapshots correspond to the same moment in time. zfs can be used as an alias for zfs. See the Snapshots section of zfsconcepts(7) for details.
-o property=value
  Set the specified property; see zfs for details.
-r
  Recursively create snapshots of all descendent datasets

EXAMPLES

Example 1: Creating a ZFS Snapshot

The following command creates a snapshot named yesterday. This snapshot is mounted on demand in the .zfs/snapshot directory at the root of the pool/home/bob file system.

    # zfs

Example 2: Creating and Destroying Multiple Snapshots

The following command creates snapshots named yesterday of pool/home and all of its descendent file systems. Each snapshot is mounted on demand in the .zfs/snapshot directory at the root of its file system. The second command destroys the newly created snapshots.

    # zfs

    # zfs

Example 3: Promoting a ZFS Clone

The following commands illustrate how to test out changes to a file system, and then replace the original file system with the changed one, using clones, clone promotion, and renaming:
# zfs
  populate /pool/project/production with data
# zfs
# zfs
  make changes to /pool/project/beta and test them
# zfs
# zfs
# zfs
  once the legacy version is no longer needed, it can be destroyed
# zfs

Example 4: Performing a Rolling Snapshot

The following example shows how to maintain a history of snapshots with a consistent naming scheme. To keep a week's worth of snapshots, the user destroys the oldest snapshot, renames the remaining snapshots, and then creates a new snapshot, as follows:
# zfs
# zfs
# zfs
# zfs
# zfs
# zfs
# zfs
# zfs
# zfs

SEE ALSO

zfs-bookmark(8), zfs-clone(8), zfs-destroy(8), zfs-diff(8), zfs-hold(8), zfs-rename(8), zfs-rollback(8), zfs-send(8)

ZFS-SNAPSHOT (8) March 16, 2022

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

VI = Virtually Incomprehensible.