zfs-clone
clone snapshot of ZFS dataset
- Provided by: zfsutils-linux (Version: 2.4.1-1ubuntu5)
- Source: zfs-linux
- Report a bug
clone snapshot of ZFS dataset
zfs |
clone [-pu]
[-o
property=value]…
snapshot
filesystem|volume |
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.
-o
property=valuezfs
create for details.-p-uThe following command creates a writable file system whose initial contents are the same as pool/home/bob@yesterday.
# zfs
clone pool/home/bob@yesterday
pool/cloneThe 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@today pool/project/beta make changes to /pool/project/beta and test them #zfspromotepool/project/beta #zfsrenamepool/project/production pool/project/legacy #zfsrenamepool/project/beta pool/project/production once the legacy version is no longer needed, it can be destroyed #zfsdestroypool/project/legacy