zfs-clone — clone snapshot of ZFS dataset
Contents
Description
See the “Clones” section of zfsconcepts(7) for details. The target dataset can be located anywhere in
the ZFS hierarchy, and is created as the same type as the original.
-oproperty=value
Sets the specified property; see zfscreate for details.
-p Creates all the non-existing parent datasets. Datasets created in this manner are automatically
mounted according to the mountpoint property inherited from their parent. If the target
filesystem or volume already exists, the operation completes successfully.
Examples
Example1: Creating a ZFS Clone
The following command creates a writable file system whose initial contents are the same as
pool/home/bob@yesterday.
#zfsclonepool/home/bob@yesterdaypool/cloneExample2: 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:
# zfscreatepool/project/production
populate /pool/project/production with data
# zfssnapshotpool/project/production@today
# zfsclonepool/project/production@todaypool/project/beta
make changes to /pool/project/beta and test them
# zfspromotepool/project/beta
# zfsrenamepool/project/productionpool/project/legacy
# zfsrenamepool/project/betapool/project/production
once the legacy version is no longer needed, it can be destroyed
# zfsdestroypool/project/legacyName
zfs-clone — clone snapshot of ZFS dataset
See Also
zfs-promote(8), zfs-snapshot(8) OpenZFS March 16, 2022 ZFS-CLONE(8)
Synopsis
zfsclone [-p] [-oproperty=value]… snapshotfilesystem|volume
