1eda14cbcSMatt Macy.\" 2eda14cbcSMatt Macy.\" CDDL HEADER START 3eda14cbcSMatt Macy.\" 4eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the 5eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License"). 6eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License. 7eda14cbcSMatt Macy.\" 8eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 10eda14cbcSMatt Macy.\" See the License for the specific language governing permissions 11eda14cbcSMatt Macy.\" and limitations under the License. 12eda14cbcSMatt Macy.\" 13eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each 14eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the 16eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying 17eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner] 18eda14cbcSMatt Macy.\" 19eda14cbcSMatt Macy.\" CDDL HEADER END 20eda14cbcSMatt Macy.\" 21eda14cbcSMatt Macy.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. 22eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> 23eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. 24eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 25eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. 26eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved. 27eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com] 28eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved. 29eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc. 30eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc. 31eda14cbcSMatt Macy.\" 32*da5137abSMartin Matuska.Dd March 16, 2022 33eda14cbcSMatt Macy.Dt ZFS-PROMOTE 8 34eda14cbcSMatt Macy.Os 3516038816SMartin Matuska. 36eda14cbcSMatt Macy.Sh NAME 377877fdebSMatt Macy.Nm zfs-promote 3816038816SMartin Matuska.Nd promote clone dataset to no longer depend on origin snapshot 39eda14cbcSMatt Macy.Sh SYNOPSIS 407877fdebSMatt Macy.Nm zfs 41eda14cbcSMatt Macy.Cm promote 4216038816SMartin Matuska.Ar clone 4316038816SMartin Matuska. 44eda14cbcSMatt Macy.Sh DESCRIPTION 45eda14cbcSMatt MacyThe 4616038816SMartin Matuska.Nm zfs Cm promote 4716038816SMartin Matuskacommand makes it possible to destroy the dataset that the clone was created from. 48eda14cbcSMatt MacyThe clone parent-child dependency relationship is reversed, so that the origin 4916038816SMartin Matuskadataset becomes a clone of the specified dataset. 50eda14cbcSMatt Macy.Pp 51eda14cbcSMatt MacyThe snapshot that was cloned, and any snapshots previous to this snapshot, are 52eda14cbcSMatt Macynow owned by the promoted clone. 5316038816SMartin MatuskaThe space they use moves from the origin dataset to the promoted clone, so 54eda14cbcSMatt Macyenough space must be available to accommodate these snapshots. 55eda14cbcSMatt MacyNo new space is consumed by this operation, but the space accounting is 56eda14cbcSMatt Macyadjusted. 57eda14cbcSMatt MacyThe promoted clone must not have any conflicting snapshot names of its own. 58eda14cbcSMatt MacyThe 5916038816SMartin Matuska.Nm zfs Cm rename 60eda14cbcSMatt Macysubcommand can be used to rename any conflicting snapshots. 6116038816SMartin Matuska. 62*da5137abSMartin Matuska.Sh EXAMPLES 63*da5137abSMartin Matuska.\" These are, respectively, examples 10 from zfs.8 64*da5137abSMartin Matuska.\" Make sure to update them bidirectionally 65*da5137abSMartin Matuska.Ss Example 1 : No Promoting a ZFS Clone 66*da5137abSMartin MatuskaThe following commands illustrate how to test out changes to a file system, and 67*da5137abSMartin Matuskathen replace the original file system with the changed one, using clones, clone 68*da5137abSMartin Matuskapromotion, and renaming: 69*da5137abSMartin Matuska.Bd -literal -compact -offset Ds 70*da5137abSMartin Matuska.No # Nm zfs Cm create Ar pool/project/production 71*da5137abSMartin Matuska populate /pool/project/production with data 72*da5137abSMartin Matuska.No # Nm zfs Cm snapshot Ar pool/project/production Ns @ Ns Ar today 73*da5137abSMartin Matuska.No # Nm zfs Cm clone Ar pool/project/production@today pool/project/beta 74*da5137abSMartin Matuska make changes to /pool/project/beta and test them 75*da5137abSMartin Matuska.No # Nm zfs Cm promote Ar pool/project/beta 76*da5137abSMartin Matuska.No # Nm zfs Cm rename Ar pool/project/production pool/project/legacy 77*da5137abSMartin Matuska.No # Nm zfs Cm rename Ar pool/project/beta pool/project/production 78*da5137abSMartin Matuska once the legacy version is no longer needed, it can be destroyed 79*da5137abSMartin Matuska.No # Nm zfs Cm destroy Ar pool/project/legacy 80*da5137abSMartin Matuska.Ed 81*da5137abSMartin Matuska. 82eda14cbcSMatt Macy.Sh SEE ALSO 8316038816SMartin Matuska.Xr zfs-clone 8 , 8416038816SMartin Matuska.Xr zfs-rename 8 85