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


2187        an empty file system.
2188 
2189        # zfs send poolA/fsA/fsB@snap | \
2190          ssh host zfs receive -d poolB/received
2191 
2192      Example 14 Setting User Properties
2193        The following example sets the user-defined com.example:department
2194        property for a dataset.
2195 
2196        # zfs set com.example:department=12345 tank/accounting
2197 
2198      Example 15 Performing a Rolling Snapshot
2199        The following example shows how to maintain a history of snapshots with
2200        a consistent naming scheme.  To keep a week's worth of snapshots, the
2201        user destroys the oldest snapshot, renames the remaining snapshots, and
2202        then creates a new snapshot, as follows:
2203 
2204        # zfs destroy -r pool/users@7daysago
2205        # zfs rename -r pool/users@6daysago @7daysago
2206        # zfs rename -r pool/users@5daysago @6daysago
2207        # zfs rename -r pool/users@yesterday @5daysago
2208        # zfs rename -r pool/users@yesterday @4daysago
2209        # zfs rename -r pool/users@yesterday @3daysago
2210        # zfs rename -r pool/users@yesterday @2daysago
2211        # zfs rename -r pool/users@today @yesterday
2212        # zfs snapshot -r pool/users@today
2213 
2214      Example 16 Setting sharenfs Property Options on a ZFS File System
2215        The following commands show how to set sharenfs property options to
2216        enable rw access for a set of IP addresses and to enable root access
2217        for system neo on the tank/home file system.
2218 
2219        # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
2220 
2221        If you are using DNS for host name resolution, specify the fully
2222        qualified hostname.
2223 
2224      Example 17 Delegating ZFS Administration Permissions on a ZFS Dataset
2225        The following example shows how to set permissions so that user cindys
2226        can create, destroy, mount, and take snapshots on tank/cindys.  The
2227        permissions on tank/cindys are also displayed.
2228 
2229        # zfs allow cindys create,destroy,mount,snapshot tank/cindys


2300        The following example shows how to see what has changed between a prior
2301        snapshot of a ZFS dataset and its current state.  The -F option is used
2302        to indicate type information for the files affected.
2303 
2304        # zfs diff -F tank/test@before tank/test
2305        M       /       /tank/test/
2306        M       F       /tank/test/linked      (+1)
2307        R       F       /tank/test/oldname -> /tank/test/newname
2308        -       F       /tank/test/deleted
2309        +       F       /tank/test/created
2310        M       F       /tank/test/modified
2311 
2312 INTERFACE STABILITY
2313      Committed.
2314 
2315 SEE ALSO
2316      gzip(1), ssh(1), mount(1M), share(1M), sharemgr(1M), unshare(1M),
2317      zonecfg(1M), zpool(1M), chmod(2), stat(2), write(2), fsync(3C),
2318      dfstab(4), acl(5), attributes(5)
2319 
2320 illumos                        February 10, 2018                       illumos


2187        an empty file system.
2188 
2189        # zfs send poolA/fsA/fsB@snap | \
2190          ssh host zfs receive -d poolB/received
2191 
2192      Example 14 Setting User Properties
2193        The following example sets the user-defined com.example:department
2194        property for a dataset.
2195 
2196        # zfs set com.example:department=12345 tank/accounting
2197 
2198      Example 15 Performing a Rolling Snapshot
2199        The following example shows how to maintain a history of snapshots with
2200        a consistent naming scheme.  To keep a week's worth of snapshots, the
2201        user destroys the oldest snapshot, renames the remaining snapshots, and
2202        then creates a new snapshot, as follows:
2203 
2204        # zfs destroy -r pool/users@7daysago
2205        # zfs rename -r pool/users@6daysago @7daysago
2206        # zfs rename -r pool/users@5daysago @6daysago
2207        # zfs rename -r pool/users@4daysago @5daysago
2208        # zfs rename -r pool/users@3daysago @4daysago
2209        # zfs rename -r pool/users@2daysago @3daysago
2210        # zfs rename -r pool/users@yesterday @2daysago
2211        # zfs rename -r pool/users@today @yesterday
2212        # zfs snapshot -r pool/users@today
2213 
2214      Example 16 Setting sharenfs Property Options on a ZFS File System
2215        The following commands show how to set sharenfs property options to
2216        enable rw access for a set of IP addresses and to enable root access
2217        for system neo on the tank/home file system.
2218 
2219        # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
2220 
2221        If you are using DNS for host name resolution, specify the fully
2222        qualified hostname.
2223 
2224      Example 17 Delegating ZFS Administration Permissions on a ZFS Dataset
2225        The following example shows how to set permissions so that user cindys
2226        can create, destroy, mount, and take snapshots on tank/cindys.  The
2227        permissions on tank/cindys are also displayed.
2228 
2229        # zfs allow cindys create,destroy,mount,snapshot tank/cindys


2300        The following example shows how to see what has changed between a prior
2301        snapshot of a ZFS dataset and its current state.  The -F option is used
2302        to indicate type information for the files affected.
2303 
2304        # zfs diff -F tank/test@before tank/test
2305        M       /       /tank/test/
2306        M       F       /tank/test/linked      (+1)
2307        R       F       /tank/test/oldname -> /tank/test/newname
2308        -       F       /tank/test/deleted
2309        +       F       /tank/test/created
2310        M       F       /tank/test/modified
2311 
2312 INTERFACE STABILITY
2313      Committed.
2314 
2315 SEE ALSO
2316      gzip(1), ssh(1), mount(1M), share(1M), sharemgr(1M), unshare(1M),
2317      zonecfg(1M), zpool(1M), chmod(2), stat(2), write(2), fsync(3C),
2318      dfstab(4), acl(5), attributes(5)
2319 
2320 illumos                         January 5, 2019                        illumos