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.\" 32eda14cbcSMatt Macy.Dd June 30, 2019 33eda14cbcSMatt Macy.Dt ZFS-HOLD 8 34eda14cbcSMatt Macy.Os 3516038816SMartin Matuska. 36eda14cbcSMatt Macy.Sh NAME 377877fdebSMatt Macy.Nm zfs-hold 3816038816SMartin Matuska.Nd hold ZFS snapshots to prevent their removal 39eda14cbcSMatt Macy.Sh SYNOPSIS 407877fdebSMatt Macy.Nm zfs 41eda14cbcSMatt Macy.Cm hold 42eda14cbcSMatt Macy.Op Fl r 4316038816SMartin Matuska.Ar tag Ar snapshot Ns … 447877fdebSMatt Macy.Nm zfs 45eda14cbcSMatt Macy.Cm holds 46*dbd5678dSMartin Matuska.Op Fl rHp 4716038816SMartin Matuska.Ar snapshot Ns … 487877fdebSMatt Macy.Nm zfs 49eda14cbcSMatt Macy.Cm release 50eda14cbcSMatt Macy.Op Fl r 5116038816SMartin Matuska.Ar tag Ar snapshot Ns … 5216038816SMartin Matuska. 53eda14cbcSMatt Macy.Sh DESCRIPTION 54eda14cbcSMatt Macy.Bl -tag -width "" 55eda14cbcSMatt Macy.It Xo 567877fdebSMatt Macy.Nm zfs 57eda14cbcSMatt Macy.Cm hold 58eda14cbcSMatt Macy.Op Fl r 5916038816SMartin Matuska.Ar tag Ar snapshot Ns … 60eda14cbcSMatt Macy.Xc 61eda14cbcSMatt MacyAdds a single reference, named with the 62eda14cbcSMatt Macy.Ar tag 6316038816SMartin Matuskaargument, to the specified snapshots. 64eda14cbcSMatt MacyEach snapshot has its own tag namespace, and tags must be unique within that 65eda14cbcSMatt Macyspace. 66eda14cbcSMatt Macy.Pp 67eda14cbcSMatt MacyIf a hold exists on a snapshot, attempts to destroy that snapshot by using the 68eda14cbcSMatt Macy.Nm zfs Cm destroy 69eda14cbcSMatt Macycommand return 7016038816SMartin Matuska.Sy EBUSY . 71eda14cbcSMatt Macy.Bl -tag -width "-r" 72eda14cbcSMatt Macy.It Fl r 73eda14cbcSMatt MacySpecifies that a hold with the given tag is applied recursively to the snapshots 74eda14cbcSMatt Macyof all descendent file systems. 75eda14cbcSMatt Macy.El 76eda14cbcSMatt Macy.It Xo 777877fdebSMatt Macy.Nm zfs 78eda14cbcSMatt Macy.Cm holds 79*dbd5678dSMartin Matuska.Op Fl rHp 8016038816SMartin Matuska.Ar snapshot Ns … 81eda14cbcSMatt Macy.Xc 82eda14cbcSMatt MacyLists all existing user references for the given snapshot or snapshots. 83eda14cbcSMatt Macy.Bl -tag -width "-r" 84eda14cbcSMatt Macy.It Fl r 85eda14cbcSMatt MacyLists the holds that are set on the named descendent snapshots, in addition to 86eda14cbcSMatt Macylisting the holds on the named snapshot. 87eda14cbcSMatt Macy.It Fl H 88eda14cbcSMatt MacyDo not print headers, use tab-delimited output. 89*dbd5678dSMartin Matuska.It Fl p 90*dbd5678dSMartin MatuskaPrints holds timestamps as unix epoch timestamps. 91eda14cbcSMatt Macy.El 92eda14cbcSMatt Macy.It Xo 937877fdebSMatt Macy.Nm zfs 94eda14cbcSMatt Macy.Cm release 95eda14cbcSMatt Macy.Op Fl r 9616038816SMartin Matuska.Ar tag Ar snapshot Ns … 97eda14cbcSMatt Macy.Xc 98eda14cbcSMatt MacyRemoves a single reference, named with the 99eda14cbcSMatt Macy.Ar tag 100eda14cbcSMatt Macyargument, from the specified snapshot or snapshots. 101eda14cbcSMatt MacyThe tag must already exist for each snapshot. 102eda14cbcSMatt MacyIf a hold exists on a snapshot, attempts to destroy that snapshot by using the 103eda14cbcSMatt Macy.Nm zfs Cm destroy 104eda14cbcSMatt Macycommand return 10516038816SMartin Matuska.Sy EBUSY . 106eda14cbcSMatt Macy.Bl -tag -width "-r" 107eda14cbcSMatt Macy.It Fl r 108eda14cbcSMatt MacyRecursively releases a hold with the given tag on the snapshots of all 109eda14cbcSMatt Macydescendent file systems. 110eda14cbcSMatt Macy.El 111eda14cbcSMatt Macy.El 11216038816SMartin Matuska. 113eda14cbcSMatt Macy.Sh SEE ALSO 114eda14cbcSMatt Macy.Xr zfs-destroy 8 115