1*eda14cbcSMatt Macy.\" 2*eda14cbcSMatt Macy.\" CDDL HEADER START 3*eda14cbcSMatt Macy.\" 4*eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the 5*eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License"). 6*eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License. 7*eda14cbcSMatt Macy.\" 8*eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 10*eda14cbcSMatt Macy.\" See the License for the specific language governing permissions 11*eda14cbcSMatt Macy.\" and limitations under the License. 12*eda14cbcSMatt Macy.\" 13*eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each 14*eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the 16*eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying 17*eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner] 18*eda14cbcSMatt Macy.\" 19*eda14cbcSMatt Macy.\" CDDL HEADER END 20*eda14cbcSMatt Macy.\" 21*eda14cbcSMatt Macy.\" 22*eda14cbcSMatt Macy.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. 23*eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> 24*eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. 25*eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 26*eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. 27*eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved. 28*eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com] 29*eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved. 30*eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc. 31*eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc. 32*eda14cbcSMatt Macy.\" 33*eda14cbcSMatt Macy.Dd June 30, 2019 34*eda14cbcSMatt Macy.Dt ZFS-RENAME 8 35*eda14cbcSMatt Macy.Os 36*eda14cbcSMatt Macy.Sh NAME 37*eda14cbcSMatt Macy.Nm zfs Ns Pf - Cm rename 38*eda14cbcSMatt Macy.Nd Renames the given dataset (filesystem or snapshot). 39*eda14cbcSMatt Macy.Sh SYNOPSIS 40*eda14cbcSMatt Macy.Nm 41*eda14cbcSMatt Macy.Cm rename 42*eda14cbcSMatt Macy.Op Fl f 43*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 44*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 45*eda14cbcSMatt Macy.Nm 46*eda14cbcSMatt Macy.Cm rename 47*eda14cbcSMatt Macy.Op Fl fp 48*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume 49*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume 50*eda14cbcSMatt Macy.Sh DESCRIPTION 51*eda14cbcSMatt Macy.Bl -tag -width "" 52*eda14cbcSMatt Macy.It Xo 53*eda14cbcSMatt Macy.Nm 54*eda14cbcSMatt Macy.Cm rename 55*eda14cbcSMatt Macy.Op Fl f 56*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 57*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 58*eda14cbcSMatt Macy.Xc 59*eda14cbcSMatt Macy.It Xo 60*eda14cbcSMatt Macy.Nm 61*eda14cbcSMatt Macy.Cm rename 62*eda14cbcSMatt Macy.Op Fl fp 63*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume 64*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume 65*eda14cbcSMatt Macy.Xc 66*eda14cbcSMatt MacyRenames the given dataset. 67*eda14cbcSMatt MacyThe new target can be located anywhere in the ZFS hierarchy, with the exception 68*eda14cbcSMatt Macyof snapshots. 69*eda14cbcSMatt MacySnapshots can only be renamed within the parent file system or volume. 70*eda14cbcSMatt MacyWhen renaming a snapshot, the parent file system of the snapshot does not need 71*eda14cbcSMatt Macyto be specified as part of the second argument. 72*eda14cbcSMatt MacyRenamed file systems can inherit new mount points, in which case they are 73*eda14cbcSMatt Macyunmounted and remounted at the new mount point. 74*eda14cbcSMatt Macy.Bl -tag -width "-a" 75*eda14cbcSMatt Macy.It Fl f 76*eda14cbcSMatt MacyForce unmount any filesystems that need to be unmounted in the process. 77*eda14cbcSMatt Macy.It Fl p 78*eda14cbcSMatt MacyCreates all the nonexistent parent datasets. 79*eda14cbcSMatt MacyDatasets created in this manner are automatically mounted according to the 80*eda14cbcSMatt Macy.Sy mountpoint 81*eda14cbcSMatt Macyproperty inherited from their parent. 82*eda14cbcSMatt Macy.El 83*eda14cbcSMatt Macy.It Xo 84*eda14cbcSMatt Macy.Nm 85*eda14cbcSMatt Macy.Cm rename 86*eda14cbcSMatt Macy.Fl r 87*eda14cbcSMatt Macy.Ar snapshot Ar snapshot 88*eda14cbcSMatt Macy.Xc 89*eda14cbcSMatt MacyRecursively rename the snapshots of all descendent datasets. 90*eda14cbcSMatt MacySnapshots are the only dataset that can be renamed recursively. 91*eda14cbcSMatt Macy.El 92