aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/man/man8/zfs-clone.8
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/man/man8/zfs-clone.8')
-rw-r--r--sys/contrib/openzfs/man/man8/zfs-clone.830
1 files changed, 28 insertions, 2 deletions
diff --git a/sys/contrib/openzfs/man/man8/zfs-clone.8 b/sys/contrib/openzfs/man/man8/zfs-clone.8
index 0640244f2009..fee629951c36 100644
--- a/sys/contrib/openzfs/man/man8/zfs-clone.8
+++ b/sys/contrib/openzfs/man/man8/zfs-clone.8
@@ -6,7 +6,7 @@
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-.\" or http://www.opensolaris.org/os/licensing.
+.\" or https://opensource.org/licenses/CDDL-1.0.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
@@ -29,7 +29,7 @@
.\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc.
.\"
-.Dd May 27, 2021
+.Dd March 16, 2022
.Dt ZFS-CLONE 8
.Os
.
@@ -65,6 +65,32 @@ If the target filesystem or volume already exists, the operation completes
successfully.
.El
.
+.Sh EXAMPLES
+.\" These are, respectively, examples 9, 10 from zfs.8
+.\" Make sure to update them bidirectionally
+.Ss Example 1 : No Creating a ZFS Clone
+The following command creates a writable file system whose initial contents are
+the same as
+.Ar pool/home/bob@yesterday .
+.Dl # Nm zfs Cm clone Ar pool/home/bob@yesterday pool/clone
+.
+.Ss Example 2 : No 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:
+.Bd -literal -compact -offset Ds
+.No # Nm zfs Cm create Ar pool/project/production
+ populate /pool/project/production with data
+.No # Nm zfs Cm snapshot Ar pool/project/production Ns @ Ns Ar today
+.No # Nm zfs Cm clone Ar pool/project/production@today pool/project/beta
+ make changes to /pool/project/beta and test them
+.No # Nm zfs Cm promote Ar pool/project/beta
+.No # Nm zfs Cm rename Ar pool/project/production pool/project/legacy
+.No # Nm zfs Cm rename Ar pool/project/beta pool/project/production
+ once the legacy version is no longer needed, it can be destroyed
+.No # Nm zfs Cm destroy Ar pool/project/legacy
+.Ed
+.
.Sh SEE ALSO
.Xr zfs-promote 8 ,
.Xr zfs-snapshot 8