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 9271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0. 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.\" 32da5137abSMartin 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 47*bb2d13b6SMartin Matuskacommand makes it possible to destroy the dataset that the clone was created 48*bb2d13b6SMartin Matuskafrom. 49eda14cbcSMatt MacyThe clone parent-child dependency relationship is reversed, so that the origin 5016038816SMartin Matuskadataset becomes a clone of the specified dataset. 51eda14cbcSMatt Macy.Pp 52eda14cbcSMatt MacyThe snapshot that was cloned, and any snapshots previous to this snapshot, are 53eda14cbcSMatt Macynow owned by the promoted clone. 5416038816SMartin MatuskaThe space they use moves from the origin dataset to the promoted clone, so 55eda14cbcSMatt Macyenough space must be available to accommodate these snapshots. 56eda14cbcSMatt MacyNo new space is consumed by this operation, but the space accounting is 57eda14cbcSMatt Macyadjusted. 58eda14cbcSMatt MacyThe promoted clone must not have any conflicting snapshot names of its own. 59eda14cbcSMatt MacyThe 6016038816SMartin Matuska.Nm zfs Cm rename 61eda14cbcSMatt Macysubcommand can be used to rename any conflicting snapshots. 6216038816SMartin Matuska. 63da5137abSMartin Matuska.Sh EXAMPLES 64da5137abSMartin Matuska.\" These are, respectively, examples 10 from zfs.8 65da5137abSMartin Matuska.\" Make sure to update them bidirectionally 66da5137abSMartin Matuska.Ss Example 1 : No Promoting a ZFS Clone 67da5137abSMartin MatuskaThe following commands illustrate how to test out changes to a file system, and 68da5137abSMartin Matuskathen replace the original file system with the changed one, using clones, clone 69da5137abSMartin Matuskapromotion, and renaming: 70da5137abSMartin Matuska.Bd -literal -compact -offset Ds 71da5137abSMartin Matuska.No # Nm zfs Cm create Ar pool/project/production 72da5137abSMartin Matuska populate /pool/project/production with data 73da5137abSMartin Matuska.No # Nm zfs Cm snapshot Ar pool/project/production Ns @ Ns Ar today 74da5137abSMartin Matuska.No # Nm zfs Cm clone Ar pool/project/production@today pool/project/beta 75da5137abSMartin Matuska make changes to /pool/project/beta and test them 76da5137abSMartin Matuska.No # Nm zfs Cm promote Ar pool/project/beta 77da5137abSMartin Matuska.No # Nm zfs Cm rename Ar pool/project/production pool/project/legacy 78da5137abSMartin Matuska.No # Nm zfs Cm rename Ar pool/project/beta pool/project/production 79da5137abSMartin Matuska once the legacy version is no longer needed, it can be destroyed 80da5137abSMartin Matuska.No # Nm zfs Cm destroy Ar pool/project/legacy 81da5137abSMartin Matuska.Ed 82da5137abSMartin Matuska. 83eda14cbcSMatt Macy.Sh SEE ALSO 8416038816SMartin Matuska.Xr zfs-clone 8 , 8516038816SMartin Matuska.Xr zfs-rename 8 86