zfs-promote — promote clone dataset to no longer depend on origin snapshot
Contents
Description
The zfspromote command makes it possible to destroy the dataset that the clone was created from. The
clone parent-child dependency relationship is reversed, so that the origin dataset becomes a clone of the
specified dataset.
The snapshot that was cloned, and any snapshots previous to this snapshot, are now owned by the promoted
clone. The space they use moves from the origin dataset to the promoted clone, so enough space must be
available to accommodate these snapshots. No new space is consumed by this operation, but the space
accounting is adjusted. The promoted clone must not have any conflicting snapshot names of its own. The
zfsrename subcommand can be used to rename any conflicting snapshots.
Examples
Example1: 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-promote — promote clone dataset to no longer depend on origin snapshot
See Also
zfs-clone(8), zfs-rename(8) OpenZFS March 16, 2022 ZFS-PROMOTE(8)
Synopsis
zfspromoteclone
