Print this page
9623 zfs.1m uses wrong snapshot names in Example 15


  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 .\"
  21 .\"
  22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
  23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
  24 .\" Copyright (c) 2011, 2016 by Delphix. All rights reserved.
  25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
  27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
  28 .\" Copyright (c) 2014 Integros [integros.com]
  29 .\" Copyright 2018 Nexenta Systems, Inc.
  30 .\" Copyright 2018 Joyent, Inc.
  31 .\" Copyright (c) 2018 Datto Inc.
  32 .\"
  33 .Dd Feb 10, 2018
  34 .Dt ZFS 1M
  35 .Os
  36 .Sh NAME
  37 .Nm zfs
  38 .Nd configures ZFS file systems
  39 .Sh SYNOPSIS
  40 .Nm
  41 .Op Fl \?
  42 .Nm
  43 .Cm create
  44 .Op Fl p
  45 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
  46 .Ar filesystem
  47 .Nm
  48 .Cm create
  49 .Op Fl ps
  50 .Op Fl b Ar blocksize
  51 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
  52 .Fl V Ar size Ar volume
  53 .Nm


3753 .Bd -literal
3754 # zfs send poolA/fsA/fsB@snap | \e
3755   ssh host zfs receive -d poolB/received
3756 .Ed
3757 .It Sy Example 14 No Setting User Properties
3758 The following example sets the user-defined
3759 .Sy com.example:department
3760 property for a dataset.
3761 .Bd -literal
3762 # zfs set com.example:department=12345 tank/accounting
3763 .Ed
3764 .It Sy Example 15 No Performing a Rolling Snapshot
3765 The following example shows how to maintain a history of snapshots with a
3766 consistent naming scheme.
3767 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3768 renames the remaining snapshots, and then creates a new snapshot, as follows:
3769 .Bd -literal
3770 # zfs destroy -r pool/users@7daysago
3771 # zfs rename -r pool/users@6daysago @7daysago
3772 # zfs rename -r pool/users@5daysago @6daysago
3773 # zfs rename -r pool/users@yesterday @5daysago
3774 # zfs rename -r pool/users@yesterday @4daysago
3775 # zfs rename -r pool/users@yesterday @3daysago
3776 # zfs rename -r pool/users@yesterday @2daysago
3777 # zfs rename -r pool/users@today @yesterday
3778 # zfs snapshot -r pool/users@today
3779 .Ed
3780 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3781 The following commands show how to set
3782 .Sy sharenfs
3783 property options to enable
3784 .Sy rw
3785 access for a set of
3786 .Sy IP
3787 addresses and to enable root access for system
3788 .Sy neo
3789 on the
3790 .Em tank/home
3791 file system.
3792 .Bd -literal
3793 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3794 .Ed
3795 .Pp




  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 .\"
  21 .\"
  22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
  23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
  24 .\" Copyright (c) 2011, 2016 by Delphix. All rights reserved.
  25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
  27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
  28 .\" Copyright (c) 2014 Integros [integros.com]
  29 .\" Copyright 2018 Nexenta Systems, Inc.
  30 .\" Copyright 2018 Joyent, Inc.
  31 .\" Copyright (c) 2018 Datto Inc.
  32 .\"
  33 .Dd Jan 05, 2019
  34 .Dt ZFS 1M
  35 .Os
  36 .Sh NAME
  37 .Nm zfs
  38 .Nd configures ZFS file systems
  39 .Sh SYNOPSIS
  40 .Nm
  41 .Op Fl \?
  42 .Nm
  43 .Cm create
  44 .Op Fl p
  45 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
  46 .Ar filesystem
  47 .Nm
  48 .Cm create
  49 .Op Fl ps
  50 .Op Fl b Ar blocksize
  51 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
  52 .Fl V Ar size Ar volume
  53 .Nm


3753 .Bd -literal
3754 # zfs send poolA/fsA/fsB@snap | \e
3755   ssh host zfs receive -d poolB/received
3756 .Ed
3757 .It Sy Example 14 No Setting User Properties
3758 The following example sets the user-defined
3759 .Sy com.example:department
3760 property for a dataset.
3761 .Bd -literal
3762 # zfs set com.example:department=12345 tank/accounting
3763 .Ed
3764 .It Sy Example 15 No Performing a Rolling Snapshot
3765 The following example shows how to maintain a history of snapshots with a
3766 consistent naming scheme.
3767 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3768 renames the remaining snapshots, and then creates a new snapshot, as follows:
3769 .Bd -literal
3770 # zfs destroy -r pool/users@7daysago
3771 # zfs rename -r pool/users@6daysago @7daysago
3772 # zfs rename -r pool/users@5daysago @6daysago
3773 # zfs rename -r pool/users@4daysago @5daysago
3774 # zfs rename -r pool/users@3daysago @4daysago
3775 # zfs rename -r pool/users@2daysago @3daysago
3776 # zfs rename -r pool/users@yesterday @2daysago
3777 # zfs rename -r pool/users@today @yesterday
3778 # zfs snapshot -r pool/users@today
3779 .Ed
3780 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3781 The following commands show how to set
3782 .Sy sharenfs
3783 property options to enable
3784 .Sy rw
3785 access for a set of
3786 .Sy IP
3787 addresses and to enable root access for system
3788 .Sy neo
3789 on the
3790 .Em tank/home
3791 file system.
3792 .Bd -literal
3793 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3794 .Ed
3795 .Pp