Print this page
6536 zfs send: want a way to disable sending of free records
Reviewed by: Alexander Stetsenko <astetsenko@racktopsystems.com>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>


   9 .\" or http://www.opensolaris.org/os/licensing.
  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 .\"
  21 .\"
  22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
  23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
  24 .\" Copyright (c) 2011, 2015 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 2015 Nexenta Systems, Inc.  All Rights Reserved.

  29 .\"
  30 .Dd June 8, 2015
  31 .Dt ZFS 1M
  32 .Os
  33 .Sh NAME
  34 .Nm zfs
  35 .Nd configures ZFS file systems
  36 .Sh SYNOPSIS
  37 .Nm
  38 .Op Fl \?
  39 .Nm
  40 .Cm create
  41 .Op Fl p
  42 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
  43 .Ar filesystem
  44 .Nm
  45 .Cm create
  46 .Op Fl ps
  47 .Op Fl b Ar blocksize
  48 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
  49 .Fl V Ar size Ar volume
  50 .Nm


 147 .Nm
 148 .Cm mount
 149 .Op Fl Ov
 150 .Op Fl o Ar options
 151 .Fl a | Ar filesystem
 152 .Nm
 153 .Cm unmount
 154 .Op Fl f
 155 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
 156 .Nm
 157 .Cm share
 158 .Fl a | Ar filesystem
 159 .Nm
 160 .Cm unshare
 161 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
 162 .Nm
 163 .Cm bookmark
 164 .Ar snapshot bookmark
 165 .Nm
 166 .Cm send
 167 .Op Fl DLPRenpv
 168 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
 169 .Ar snapshot
 170 .Nm
 171 .Cm send
 172 .Op Fl Le
 173 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
 174 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
 175 .Nm
 176 .Cm send
 177 .Op Fl Penv
 178 .Fl t Ar receive_resume_token
 179 .Nm
 180 .Cm receive
 181 .Op Fl Fnsuv
 182 .Op Fl o Sy origin Ns = Ns Ar snapshot
 183 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
 184 .Nm
 185 .Cm receive
 186 .Op Fl Fnsuv
 187 .Op Fl d Ns | Ns Fl e
 188 .Op Fl o Sy origin Ns = Ns Ar snapshot
 189 .Ar filesystem
 190 .Nm
 191 .Cm receive
 192 .Fl A


2452 file system shared on the system.
2453 .El
2454 .It Xo
2455 .Nm
2456 .Cm bookmark
2457 .Ar snapshot bookmark
2458 .Xc
2459 Creates a bookmark of the given snapshot. Bookmarks mark the point in time when
2460 the snapshot was created, and can be used as the incremental source for a
2461 .Nm zfs Cm send
2462 command.
2463 .Pp
2464 This feature must be enabled to be used. See
2465 .Xr zpool-features 5
2466 for details on ZFS feature flags and the
2467 .Sy bookmarks
2468 feature.
2469 .It Xo
2470 .Nm
2471 .Cm send
2472 .Op Fl DLPRenpv
2473 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2474 .Ar snapshot
2475 .Xc
2476 Creates a stream representation of the second
2477 .Ar snapshot ,
2478 which is written to standard output. The output can be redirected to a file or
2479 to a different system
2480 .Po for example, using
2481 .Xr ssh 1
2482 .Pc .
2483 By default, a full stream is generated.
2484 .Bl -tag -width "-D"
2485 .It Fl D
2486 Generate a deduplicated stream. Blocks which would have been sent multiple times
2487 in the send stream will only be sent once. The receiving system must also
2488 support this feature to recieve a deduplicated stream. This flag can be used
2489 regardless of the dataset's
2490 .Sy dedup
2491 property, but performance will be much better if the filesystem uses a
2492 dedup-capable checksum


2536 .Fl F
2537 flag is specified when this stream is received, snapshots and file systems that
2538 do not exist on the sending side are destroyed.
2539 .It Fl e
2540 Generate a more compact stream by using
2541 .Sy WRITE_EMBEDDED
2542 records for blocks which are stored more compactly on disk by the
2543 .Sy embedded_data
2544 pool feature. This flag has no effect if the
2545 .Sy embedded_data
2546 feature is disabled. The receiving system must have the
2547 .Sy embedded_data
2548 feature enabled. If the
2549 .Sy lz4_compress
2550 feature is active on the sending system, then the receiving system must have
2551 that feature enabled as well. See
2552 .Xr zpool-features 5
2553 for details on ZFS feature flags and the
2554 .Sy embedded_data
2555 feature.



2556 .It Fl i Ar snapshot
2557 Generate an incremental stream from the first
2558 .Ar snapshot
2559 .Pq the incremental source
2560 to the second
2561 .Ar snapshot
2562 .Pq the incremental target .
2563 The incremental source can be specified as the last component of the snapshot
2564 name
2565 .Po the
2566 .Sy @
2567 character and following
2568 .Pc
2569 and it is assumed to be from the same file system as the incremental target.
2570 .Pp
2571 If the destination is a clone, the source may be the origin snapshot, which must
2572 be fully specified
2573 .Po for example,
2574 .Em pool/fs@origin ,
2575 not just


2585 .Fl P
2586 flags to determine what data will be sent. In this case, the verbose output will
2587 be written to standard output
2588 .Po contrast with a non-dry-run, where the stream is written to standard output
2589 and the verbose output goes to standard error
2590 .Pc .
2591 .It Fl p
2592 Include the dataset's properties in the stream. This flag is implicit when
2593 .Fl R
2594 is specified. The receiving system must also support this feature.
2595 .It Fl v
2596 Print verbose information about the stream package generated. This information
2597 includes a per-second report of how much data has been sent.
2598 .Pp
2599 The format of the stream is committed. You will be able to receive your streams
2600 on future versions of ZFS .
2601 .El
2602 .It Xo
2603 .Nm
2604 .Cm send
2605 .Op Fl Le
2606 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2607 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2608 .Xc
2609 Generate a send stream, which may be of a filesystem, and may be incremental
2610 from a bookmark. If the destination is a filesystem or volume, the pool must be
2611 read-only, or the filesystem must not be mounted. When the stream generated from
2612 a filesystem or volume is received, the default snapshot name will be
2613 .Qq --head-- .
2614 .Bl -tag -width "-L"
2615 .It Fl L
2616 Generate a stream which may contain blocks larger than 128KB. This flag has no
2617 effect if the
2618 .Sy large_blocks
2619 pool feature is disabled, or if the
2620 .Sy recordsize
2621 property of this filesystem has never been set above 128KB. The receiving system
2622 must have the
2623 .Sy large_blocks
2624 pool feature enabled as well. See
2625 .Xr zpool-features 5
2626 for details on ZFS feature flags and the
2627 .Sy large_blocks
2628 feature.
2629 .It Fl e
2630 Generate a more compact stream by using
2631 .Sy WRITE_EMBEDDED
2632 records for blocks which are stored more compactly on disk by the
2633 .Sy embedded_data
2634 pool feature. This flag has no effect if the
2635 .Sy embedded_data
2636 feature is disabled. The receiving system must have the
2637 .Sy embedded_data
2638 feature enabled. If the
2639 .Sy lz4_compress
2640 feature is active on the sending system, then the receiving system must have
2641 that feature enabled as well. See
2642 .Xr zpool-features 5
2643 for details on ZFS feature flags and the
2644 .Sy embedded_data
2645 feature.



2646 .It Fl i Ar snapshot Ns | Ns Ar bookmark
2647 Generate an incremental send stream. The incremental source must be an earlier
2648 snapshot in the destination's history. It will commonly be an earlier snapshot
2649 in the destination's file system, in which case it can be specified as the last
2650 component of the name
2651 .Po the
2652 .Sy #
2653 or
2654 .Sy @
2655 character and following
2656 .Pc .
2657 .Pp
2658 If the incremental target is a clone, the incremental source can be the origin
2659 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2660 origin, etc.
2661 .El
2662 .It Xo
2663 .Nm
2664 .Cm send
2665 .Op Fl Penv




   9 .\" or http://www.opensolaris.org/os/licensing.
  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 .\"
  21 .\"
  22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
  23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
  24 .\" Copyright (c) 2011, 2015 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 2015 Nexenta Systems, Inc.  All Rights Reserved.
  29 .\" Copyright 2015 RackTop Systems.
  30 .\"
  31 .Dd December 29, 2015
  32 .Dt ZFS 1M
  33 .Os
  34 .Sh NAME
  35 .Nm zfs
  36 .Nd configures ZFS file systems
  37 .Sh SYNOPSIS
  38 .Nm
  39 .Op Fl \?
  40 .Nm
  41 .Cm create
  42 .Op Fl p
  43 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
  44 .Ar filesystem
  45 .Nm
  46 .Cm create
  47 .Op Fl ps
  48 .Op Fl b Ar blocksize
  49 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
  50 .Fl V Ar size Ar volume
  51 .Nm


 148 .Nm
 149 .Cm mount
 150 .Op Fl Ov
 151 .Op Fl o Ar options
 152 .Fl a | Ar filesystem
 153 .Nm
 154 .Cm unmount
 155 .Op Fl f
 156 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
 157 .Nm
 158 .Cm share
 159 .Fl a | Ar filesystem
 160 .Nm
 161 .Cm unshare
 162 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
 163 .Nm
 164 .Cm bookmark
 165 .Ar snapshot bookmark
 166 .Nm
 167 .Cm send
 168 .Op Fl DFLPRenpv
 169 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
 170 .Ar snapshot
 171 .Nm
 172 .Cm send
 173 .Op Fl FLe
 174 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
 175 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
 176 .Nm
 177 .Cm send
 178 .Op Fl Penv
 179 .Fl t Ar receive_resume_token
 180 .Nm
 181 .Cm receive
 182 .Op Fl Fnsuv
 183 .Op Fl o Sy origin Ns = Ns Ar snapshot
 184 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
 185 .Nm
 186 .Cm receive
 187 .Op Fl Fnsuv
 188 .Op Fl d Ns | Ns Fl e
 189 .Op Fl o Sy origin Ns = Ns Ar snapshot
 190 .Ar filesystem
 191 .Nm
 192 .Cm receive
 193 .Fl A


2453 file system shared on the system.
2454 .El
2455 .It Xo
2456 .Nm
2457 .Cm bookmark
2458 .Ar snapshot bookmark
2459 .Xc
2460 Creates a bookmark of the given snapshot. Bookmarks mark the point in time when
2461 the snapshot was created, and can be used as the incremental source for a
2462 .Nm zfs Cm send
2463 command.
2464 .Pp
2465 This feature must be enabled to be used. See
2466 .Xr zpool-features 5
2467 for details on ZFS feature flags and the
2468 .Sy bookmarks
2469 feature.
2470 .It Xo
2471 .Nm
2472 .Cm send
2473 .Op Fl DFLPRenpv
2474 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2475 .Ar snapshot
2476 .Xc
2477 Creates a stream representation of the second
2478 .Ar snapshot ,
2479 which is written to standard output. The output can be redirected to a file or
2480 to a different system
2481 .Po for example, using
2482 .Xr ssh 1
2483 .Pc .
2484 By default, a full stream is generated.
2485 .Bl -tag -width "-D"
2486 .It Fl D
2487 Generate a deduplicated stream. Blocks which would have been sent multiple times
2488 in the send stream will only be sent once. The receiving system must also
2489 support this feature to recieve a deduplicated stream. This flag can be used
2490 regardless of the dataset's
2491 .Sy dedup
2492 property, but performance will be much better if the filesystem uses a
2493 dedup-capable checksum


2537 .Fl F
2538 flag is specified when this stream is received, snapshots and file systems that
2539 do not exist on the sending side are destroyed.
2540 .It Fl e
2541 Generate a more compact stream by using
2542 .Sy WRITE_EMBEDDED
2543 records for blocks which are stored more compactly on disk by the
2544 .Sy embedded_data
2545 pool feature. This flag has no effect if the
2546 .Sy embedded_data
2547 feature is disabled. The receiving system must have the
2548 .Sy embedded_data
2549 feature enabled. If the
2550 .Sy lz4_compress
2551 feature is active on the sending system, then the receiving system must have
2552 that feature enabled as well. See
2553 .Xr zpool-features 5
2554 for details on ZFS feature flags and the
2555 .Sy embedded_data
2556 feature.
2557 .It Fl F
2558 Generate a stream which omits free records.  The stream will be more compact
2559 but the receiving system will not be able to receive the stream as a clone.
2560 .It Fl i Ar snapshot
2561 Generate an incremental stream from the first
2562 .Ar snapshot
2563 .Pq the incremental source
2564 to the second
2565 .Ar snapshot
2566 .Pq the incremental target .
2567 The incremental source can be specified as the last component of the snapshot
2568 name
2569 .Po the
2570 .Sy @
2571 character and following
2572 .Pc
2573 and it is assumed to be from the same file system as the incremental target.
2574 .Pp
2575 If the destination is a clone, the source may be the origin snapshot, which must
2576 be fully specified
2577 .Po for example,
2578 .Em pool/fs@origin ,
2579 not just


2589 .Fl P
2590 flags to determine what data will be sent. In this case, the verbose output will
2591 be written to standard output
2592 .Po contrast with a non-dry-run, where the stream is written to standard output
2593 and the verbose output goes to standard error
2594 .Pc .
2595 .It Fl p
2596 Include the dataset's properties in the stream. This flag is implicit when
2597 .Fl R
2598 is specified. The receiving system must also support this feature.
2599 .It Fl v
2600 Print verbose information about the stream package generated. This information
2601 includes a per-second report of how much data has been sent.
2602 .Pp
2603 The format of the stream is committed. You will be able to receive your streams
2604 on future versions of ZFS .
2605 .El
2606 .It Xo
2607 .Nm
2608 .Cm send
2609 .Op Fl FLe
2610 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2611 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2612 .Xc
2613 Generate a send stream, which may be of a filesystem, and may be incremental
2614 from a bookmark. If the destination is a filesystem or volume, the pool must be
2615 read-only, or the filesystem must not be mounted. When the stream generated from
2616 a filesystem or volume is received, the default snapshot name will be
2617 .Qq --head-- .
2618 .Bl -tag -width "-L"
2619 .It Fl L
2620 Generate a stream which may contain blocks larger than 128KB. This flag has no
2621 effect if the
2622 .Sy large_blocks
2623 pool feature is disabled, or if the
2624 .Sy recordsize
2625 property of this filesystem has never been set above 128KB. The receiving system
2626 must have the
2627 .Sy large_blocks
2628 pool feature enabled as well. See
2629 .Xr zpool-features 5
2630 for details on ZFS feature flags and the
2631 .Sy large_blocks
2632 feature.
2633 .It Fl e
2634 Generate a more compact stream by using
2635 .Sy WRITE_EMBEDDED
2636 records for blocks which are stored more compactly on disk by the
2637 .Sy embedded_data
2638 pool feature. This flag has no effect if the
2639 .Sy embedded_data
2640 feature is disabled. The receiving system must have the
2641 .Sy embedded_data
2642 feature enabled. If the
2643 .Sy lz4_compress
2644 feature is active on the sending system, then the receiving system must have
2645 that feature enabled as well. See
2646 .Xr zpool-features 5
2647 for details on ZFS feature flags and the
2648 .Sy embedded_data
2649 feature.
2650 .It Fl F
2651 Generate a stream which omits free records.  The stream will be more compact
2652 but the receiving system will not be able to receive the stream as a clone.
2653 .It Fl i Ar snapshot Ns | Ns Ar bookmark
2654 Generate an incremental send stream. The incremental source must be an earlier
2655 snapshot in the destination's history. It will commonly be an earlier snapshot
2656 in the destination's file system, in which case it can be specified as the last
2657 component of the name
2658 .Po the
2659 .Sy #
2660 or
2661 .Sy @
2662 character and following
2663 .Pc .
2664 .Pp
2665 If the incremental target is a clone, the incremental source can be the origin
2666 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2667 origin, etc.
2668 .El
2669 .It Xo
2670 .Nm
2671 .Cm send
2672 .Op Fl Penv