]> git.proxmox.com Git - mirror_zfs.git/blame - man/man8/zfs-promote.8
FreeBSD: Add zfs_link_create() error handling
[mirror_zfs.git] / man / man8 / zfs-promote.8
CommitLineData
870fc32f
RW
1.\"
2.\" CDDL HEADER START
3.\"
4.\" The contents of this file are subject to the terms of the
5.\" Common Development and Distribution License (the "License").
6.\" You may not use this file except in compliance with the License.
7.\"
8.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1d3ba0bf 9.\" or https://opensource.org/licenses/CDDL-1.0.
870fc32f
RW
10.\" See the License for the specific language governing permissions
11.\" and limitations under the License.
12.\"
13.\" When distributing Covered Code, include this CDDL HEADER in each
14.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15.\" If applicable, add the following below this CDDL HEADER, with the
16.\" fields enclosed by brackets "[]" replaced with your own identifying
17.\" information: Portions Copyright [yyyy] [name of copyright owner]
18.\"
19.\" CDDL HEADER END
20.\"
870fc32f
RW
21.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
22.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
23.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
25.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
26.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
27.\" Copyright (c) 2014 Integros [integros.com]
28.\" Copyright 2019 Richard Laager. All rights reserved.
29.\" Copyright 2018 Nexenta Systems, Inc.
30.\" Copyright 2019 Joyent, Inc.
31.\"
bc2fe49a 32.Dd March 16, 2022
870fc32f 33.Dt ZFS-PROMOTE 8
6706552e 34.Os
f84fe3fc 35.
870fc32f 36.Sh NAME
1e36af8c 37.Nm zfs-promote
f84fe3fc 38.Nd promote clone dataset to no longer depend on origin snapshot
870fc32f 39.Sh SYNOPSIS
1e36af8c 40.Nm zfs
870fc32f 41.Cm promote
f84fe3fc
AZ
42.Ar clone
43.
870fc32f 44.Sh DESCRIPTION
870fc32f 45The
f84fe3fc 46.Nm zfs Cm promote
b46be903
DS
47command makes it possible to destroy the dataset that the clone was created
48from.
870fc32f 49The clone parent-child dependency relationship is reversed, so that the origin
f84fe3fc 50dataset becomes a clone of the specified dataset.
870fc32f
RW
51.Pp
52The snapshot that was cloned, and any snapshots previous to this snapshot, are
53now owned by the promoted clone.
f84fe3fc 54The space they use moves from the origin dataset to the promoted clone, so
870fc32f
RW
55enough space must be available to accommodate these snapshots.
56No new space is consumed by this operation, but the space accounting is
57adjusted.
58The promoted clone must not have any conflicting snapshot names of its own.
59The
f84fe3fc 60.Nm zfs Cm rename
870fc32f 61subcommand can be used to rename any conflicting snapshots.
f84fe3fc 62.
bc2fe49a
AZ
63.Sh EXAMPLES
64.\" These are, respectively, examples 10 from zfs.8
65.\" Make sure to update them bidirectionally
66.Ss Example 1 : No Promoting a ZFS Clone
67The following commands illustrate how to test out changes to a file system, and
68then replace the original file system with the changed one, using clones, clone
69promotion, and renaming:
70.Bd -literal -compact -offset Ds
71.No # Nm zfs Cm create Ar pool/project/production
72 populate /pool/project/production with data
73.No # Nm zfs Cm snapshot Ar pool/project/production Ns @ Ns Ar today
74.No # Nm zfs Cm clone Ar pool/project/production@today pool/project/beta
75 make changes to /pool/project/beta and test them
76.No # Nm zfs Cm promote Ar pool/project/beta
77.No # Nm zfs Cm rename Ar pool/project/production pool/project/legacy
78.No # Nm zfs Cm rename Ar pool/project/beta pool/project/production
79 once the legacy version is no longer needed, it can be destroyed
80.No # Nm zfs Cm destroy Ar pool/project/legacy
81.Ed
82.
870fc32f 83.Sh SEE ALSO
f84fe3fc
AZ
84.Xr zfs-clone 8 ,
85.Xr zfs-rename 8