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 9eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 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.\" 22eda14cbcSMatt Macy.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. 23eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> 24eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. 25eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 26eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. 27eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved. 28eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com] 29eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved. 30eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc. 31eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc. 32eda14cbcSMatt Macy.\" 33eda14cbcSMatt Macy.Dd June 30, 2019 34eda14cbcSMatt Macy.Dt ZFS-SEND 8 35eda14cbcSMatt Macy.Os 36eda14cbcSMatt Macy.Sh NAME 37*7877fdebSMatt Macy.Nm zfs-send 38eda14cbcSMatt Macy.Nd Generate a send stream, which may be of a filesystem, and may be incremental from a bookmark. 39eda14cbcSMatt Macy.Sh SYNOPSIS 40*7877fdebSMatt Macy.Nm zfs 41eda14cbcSMatt Macy.Cm send 42eda14cbcSMatt Macy.Op Fl DLPRbcehnpvw 43eda14cbcSMatt Macy.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot 44eda14cbcSMatt Macy.Ar snapshot 45*7877fdebSMatt Macy.Nm zfs 46eda14cbcSMatt Macy.Cm send 47eda14cbcSMatt Macy.Op Fl DLPRcenpvw 48eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 49eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 50*7877fdebSMatt Macy.Nm zfs 51eda14cbcSMatt Macy.Cm send 52eda14cbcSMatt Macy.Fl -redact Ar redaction_bookmark 53eda14cbcSMatt Macy.Op Fl DLPcenpv 54eda14cbcSMatt Macy.br 55eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 56eda14cbcSMatt Macy.Ar snapshot 57*7877fdebSMatt Macy.Nm zfs 58eda14cbcSMatt Macy.Cm send 59eda14cbcSMatt Macy.Op Fl Penv 60eda14cbcSMatt Macy.Fl t 61eda14cbcSMatt Macy.Ar receive_resume_token 62*7877fdebSMatt Macy.Nm zfs 63eda14cbcSMatt Macy.Cm send 64eda14cbcSMatt Macy.Op Fl Pnv 65eda14cbcSMatt Macy.Fl S Ar filesystem 66*7877fdebSMatt Macy.Nm zfs 67eda14cbcSMatt Macy.Cm redact 68eda14cbcSMatt Macy.Ar snapshot redaction_bookmark 69eda14cbcSMatt Macy.Ar redaction_snapshot Ns ... 70eda14cbcSMatt Macy.Sh DESCRIPTION 71eda14cbcSMatt Macy.Bl -tag -width "" 72eda14cbcSMatt Macy.It Xo 73*7877fdebSMatt Macy.Nm zfs 74eda14cbcSMatt Macy.Cm send 75eda14cbcSMatt Macy.Op Fl DLPRbcehnpvw 76eda14cbcSMatt Macy.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot 77eda14cbcSMatt Macy.Ar snapshot 78eda14cbcSMatt Macy.Xc 79eda14cbcSMatt MacyCreates a stream representation of the second 80eda14cbcSMatt Macy.Ar snapshot , 81eda14cbcSMatt Macywhich is written to standard output. 82eda14cbcSMatt MacyThe output can be redirected to a file or to a different system 83eda14cbcSMatt Macy.Po for example, using 84eda14cbcSMatt Macy.Xr ssh 1 85eda14cbcSMatt Macy.Pc . 86eda14cbcSMatt MacyBy default, a full stream is generated. 87eda14cbcSMatt Macy.Bl -tag -width "-D" 88eda14cbcSMatt Macy.It Fl D, -dedup 89eda14cbcSMatt MacyDeduplicated send is no longer supported. 90eda14cbcSMatt MacyThis flag is accepted for backwards compatibility, but a regular, 91eda14cbcSMatt Macynon-deduplicated stream will be generated. 92eda14cbcSMatt Macy.It Fl I Ar snapshot 93eda14cbcSMatt MacyGenerate a stream package that sends all intermediary snapshots from the first 94eda14cbcSMatt Macysnapshot to the second snapshot. 95eda14cbcSMatt MacyFor example, 96eda14cbcSMatt Macy.Fl I Em @a Em fs@d 97eda14cbcSMatt Macyis similar to 98eda14cbcSMatt Macy.Fl i Em @a Em fs@b Ns \&; Fl i Em @b Em fs@c Ns \&; Fl i Em @c Em fs@d . 99eda14cbcSMatt MacyThe incremental source may be specified as with the 100eda14cbcSMatt Macy.Fl i 101eda14cbcSMatt Macyoption. 102eda14cbcSMatt Macy.It Fl L, -large-block 103eda14cbcSMatt MacyGenerate a stream which may contain blocks larger than 128KB. 104eda14cbcSMatt MacyThis flag has no effect if the 105eda14cbcSMatt Macy.Sy large_blocks 106eda14cbcSMatt Macypool feature is disabled, or if the 107eda14cbcSMatt Macy.Sy recordsize 108eda14cbcSMatt Macyproperty of this filesystem has never been set above 128KB. 109eda14cbcSMatt MacyThe receiving system must have the 110eda14cbcSMatt Macy.Sy large_blocks 111eda14cbcSMatt Macypool feature enabled as well. 112eda14cbcSMatt MacySee 113eda14cbcSMatt Macy.Xr zpool-features 5 114eda14cbcSMatt Macyfor details on ZFS feature flags and the 115eda14cbcSMatt Macy.Sy large_blocks 116eda14cbcSMatt Macyfeature. 117eda14cbcSMatt Macy.It Fl P, -parsable 118eda14cbcSMatt MacyPrint machine-parsable verbose information about the stream package generated. 119eda14cbcSMatt Macy.It Fl R, -replicate 120eda14cbcSMatt MacyGenerate a replication stream package, which will replicate the specified 121eda14cbcSMatt Macyfile system, and all descendent file systems, up to the named snapshot. 122eda14cbcSMatt MacyWhen received, all properties, snapshots, descendent file systems, and clones 123eda14cbcSMatt Macyare preserved. 124eda14cbcSMatt Macy.Pp 125eda14cbcSMatt MacyIf the 126eda14cbcSMatt Macy.Fl i 127eda14cbcSMatt Macyor 128eda14cbcSMatt Macy.Fl I 129eda14cbcSMatt Macyflags are used in conjunction with the 130eda14cbcSMatt Macy.Fl R 131eda14cbcSMatt Macyflag, an incremental replication stream is generated. 132eda14cbcSMatt MacyThe current values of properties, and current snapshot and file system names are 133eda14cbcSMatt Macyset when the stream is received. 134eda14cbcSMatt MacyIf the 135eda14cbcSMatt Macy.Fl F 136eda14cbcSMatt Macyflag is specified when this stream is received, snapshots and file systems that 137eda14cbcSMatt Macydo not exist on the sending side are destroyed. If the 138eda14cbcSMatt Macy.Fl R 139eda14cbcSMatt Macyflag is used to send encrypted datasets, then 140eda14cbcSMatt Macy.Fl w 141eda14cbcSMatt Macymust also be specified. 142eda14cbcSMatt Macy.It Fl e, -embed 143eda14cbcSMatt MacyGenerate a more compact stream by using 144eda14cbcSMatt Macy.Sy WRITE_EMBEDDED 145eda14cbcSMatt Macyrecords for blocks which are stored more compactly on disk by the 146eda14cbcSMatt Macy.Sy embedded_data 147eda14cbcSMatt Macypool feature. 148eda14cbcSMatt MacyThis flag has no effect if the 149eda14cbcSMatt Macy.Sy embedded_data 150eda14cbcSMatt Macyfeature is disabled. 151eda14cbcSMatt MacyThe receiving system must have the 152eda14cbcSMatt Macy.Sy embedded_data 153eda14cbcSMatt Macyfeature enabled. 154eda14cbcSMatt MacyIf the 155eda14cbcSMatt Macy.Sy lz4_compress 156eda14cbcSMatt Macyfeature is active on the sending system, then the receiving system must have 157eda14cbcSMatt Macythat feature enabled as well. Datasets that are sent with this flag may not be 158eda14cbcSMatt Macyreceived as an encrypted dataset, since encrypted datasets cannot use the 159eda14cbcSMatt Macy.Sy embedded_data 160eda14cbcSMatt Macyfeature. 161eda14cbcSMatt MacySee 162eda14cbcSMatt Macy.Xr zpool-features 5 163eda14cbcSMatt Macyfor details on ZFS feature flags and the 164eda14cbcSMatt Macy.Sy embedded_data 165eda14cbcSMatt Macyfeature. 166eda14cbcSMatt Macy.It Fl b, -backup 167eda14cbcSMatt MacySends only received property values whether or not they are overridden by local 168eda14cbcSMatt Macysettings, but only if the dataset has ever been received. Use this option when 169eda14cbcSMatt Macyyou want 170eda14cbcSMatt Macy.Nm zfs Cm receive 171eda14cbcSMatt Macyto restore received properties backed up on the sent dataset and to avoid 172eda14cbcSMatt Macysending local settings that may have nothing to do with the source dataset, 173eda14cbcSMatt Macybut only with how the data is backed up. 174eda14cbcSMatt Macy.It Fl c, -compressed 175eda14cbcSMatt MacyGenerate a more compact stream by using compressed WRITE records for blocks 176eda14cbcSMatt Macywhich are compressed on disk and in memory 177eda14cbcSMatt Macy.Po see the 178eda14cbcSMatt Macy.Sy compression 179eda14cbcSMatt Macyproperty for details 180eda14cbcSMatt Macy.Pc . 181eda14cbcSMatt MacyIf the 182eda14cbcSMatt Macy.Sy lz4_compress 183eda14cbcSMatt Macyfeature is active on the sending system, then the receiving system must have 184eda14cbcSMatt Macythat feature enabled as well. 185eda14cbcSMatt MacyIf the 186eda14cbcSMatt Macy.Sy large_blocks 187eda14cbcSMatt Macyfeature is enabled on the sending system but the 188eda14cbcSMatt Macy.Fl L 189eda14cbcSMatt Macyoption is not supplied in conjunction with 190eda14cbcSMatt Macy.Fl c , 191eda14cbcSMatt Macythen the data will be decompressed before sending so it can be split into 192eda14cbcSMatt Macysmaller block sizes. 193eda14cbcSMatt Macy.It Fl w, -raw 194eda14cbcSMatt MacyFor encrypted datasets, send data exactly as it exists on disk. This allows 195eda14cbcSMatt Macybackups to be taken even if encryption keys are not currently loaded. The 196eda14cbcSMatt Macybackup may then be received on an untrusted machine since that machine will 197eda14cbcSMatt Macynot have the encryption keys to read the protected data or alter it without 198eda14cbcSMatt Macybeing detected. Upon being received, the dataset will have the same encryption 199eda14cbcSMatt Macykeys as it did on the send side, although the 200eda14cbcSMatt Macy.Sy keylocation 201eda14cbcSMatt Macyproperty will be defaulted to 202eda14cbcSMatt Macy.Sy prompt 203eda14cbcSMatt Macyif not otherwise provided. For unencrypted datasets, this flag will be 204eda14cbcSMatt Macyequivalent to 205eda14cbcSMatt Macy.Fl Lec . 206eda14cbcSMatt MacyNote that if you do not use this flag for sending encrypted datasets, data will 207eda14cbcSMatt Macybe sent unencrypted and may be re-encrypted with a different encryption key on 208eda14cbcSMatt Macythe receiving system, which will disable the ability to do a raw send to that 209eda14cbcSMatt Macysystem for incrementals. 210eda14cbcSMatt Macy.It Fl h, -holds 211eda14cbcSMatt MacyGenerate a stream package that includes any snapshot holds (created with the 212eda14cbcSMatt Macy.Sy zfs hold 213eda14cbcSMatt Macycommand), and indicating to 214eda14cbcSMatt Macy.Sy zfs receive 215eda14cbcSMatt Macythat the holds be applied to the dataset on the receiving system. 216eda14cbcSMatt Macy.It Fl i Ar snapshot 217eda14cbcSMatt MacyGenerate an incremental stream from the first 218eda14cbcSMatt Macy.Ar snapshot 219eda14cbcSMatt Macy.Pq the incremental source 220eda14cbcSMatt Macyto the second 221eda14cbcSMatt Macy.Ar snapshot 222eda14cbcSMatt Macy.Pq the incremental target . 223eda14cbcSMatt MacyThe incremental source can be specified as the last component of the snapshot 224eda14cbcSMatt Macyname 225eda14cbcSMatt Macy.Po the 226eda14cbcSMatt Macy.Sy @ 227eda14cbcSMatt Macycharacter and following 228eda14cbcSMatt Macy.Pc 229eda14cbcSMatt Macyand it is assumed to be from the same file system as the incremental target. 230eda14cbcSMatt Macy.Pp 231eda14cbcSMatt MacyIf the destination is a clone, the source may be the origin snapshot, which must 232eda14cbcSMatt Macybe fully specified 233eda14cbcSMatt Macy.Po for example, 234eda14cbcSMatt Macy.Em pool/fs@origin , 235eda14cbcSMatt Macynot just 236eda14cbcSMatt Macy.Em @origin 237eda14cbcSMatt Macy.Pc . 238eda14cbcSMatt Macy.It Fl n, -dryrun 239eda14cbcSMatt MacyDo a dry-run 240eda14cbcSMatt Macy.Pq Qq No-op 241eda14cbcSMatt Macysend. 242eda14cbcSMatt MacyDo not generate any actual send data. 243eda14cbcSMatt MacyThis is useful in conjunction with the 244eda14cbcSMatt Macy.Fl v 245eda14cbcSMatt Macyor 246eda14cbcSMatt Macy.Fl P 247eda14cbcSMatt Macyflags to determine what data will be sent. 248eda14cbcSMatt MacyIn this case, the verbose output will be written to standard output 249eda14cbcSMatt Macy.Po contrast with a non-dry-run, where the stream is written to standard output 250eda14cbcSMatt Macyand the verbose output goes to standard error 251eda14cbcSMatt Macy.Pc . 252eda14cbcSMatt Macy.It Fl p, -props 253eda14cbcSMatt MacyInclude the dataset's properties in the stream. 254eda14cbcSMatt MacyThis flag is implicit when 255eda14cbcSMatt Macy.Fl R 256eda14cbcSMatt Macyis specified. 257eda14cbcSMatt MacyThe receiving system must also support this feature. Sends of encrypted datasets 258eda14cbcSMatt Macymust use 259eda14cbcSMatt Macy.Fl w 260eda14cbcSMatt Macywhen using this flag. 261eda14cbcSMatt Macy.It Fl v, -verbose 262eda14cbcSMatt MacyPrint verbose information about the stream package generated. 263eda14cbcSMatt MacyThis information includes a per-second report of how much data has been sent. 264eda14cbcSMatt Macy.Pp 265eda14cbcSMatt MacyThe format of the stream is committed. 266eda14cbcSMatt MacyYou will be able to receive your streams on future versions of ZFS. 267eda14cbcSMatt Macy.El 268eda14cbcSMatt Macy.It Xo 269*7877fdebSMatt Macy.Nm zfs 270eda14cbcSMatt Macy.Cm send 271eda14cbcSMatt Macy.Op Fl DLPRcenpvw 272eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 273eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 274eda14cbcSMatt Macy.Xc 275eda14cbcSMatt MacyGenerate a send stream, which may be of a filesystem, and may be incremental 276eda14cbcSMatt Macyfrom a bookmark. 277eda14cbcSMatt MacyIf the destination is a filesystem or volume, the pool must be read-only, or the 278eda14cbcSMatt Macyfilesystem must not be mounted. 279eda14cbcSMatt MacyWhen the stream generated from a filesystem or volume is received, the default 280eda14cbcSMatt Macysnapshot name will be 281eda14cbcSMatt Macy.Qq --head-- . 282eda14cbcSMatt Macy.Bl -tag -width "-L" 283eda14cbcSMatt Macy.It Fl L, -large-block 284eda14cbcSMatt MacyGenerate a stream which may contain blocks larger than 128KB. 285eda14cbcSMatt MacyThis flag has no effect if the 286eda14cbcSMatt Macy.Sy large_blocks 287eda14cbcSMatt Macypool feature is disabled, or if the 288eda14cbcSMatt Macy.Sy recordsize 289eda14cbcSMatt Macyproperty of this filesystem has never been set above 128KB. 290eda14cbcSMatt MacyThe receiving system must have the 291eda14cbcSMatt Macy.Sy large_blocks 292eda14cbcSMatt Macypool feature enabled as well. 293eda14cbcSMatt MacySee 294eda14cbcSMatt Macy.Xr zpool-features 5 295eda14cbcSMatt Macyfor details on ZFS feature flags and the 296eda14cbcSMatt Macy.Sy large_blocks 297eda14cbcSMatt Macyfeature. 298eda14cbcSMatt Macy.It Fl P, -parsable 299eda14cbcSMatt MacyPrint machine-parsable verbose information about the stream package generated. 300eda14cbcSMatt Macy.It Fl c, -compressed 301eda14cbcSMatt MacyGenerate a more compact stream by using compressed WRITE records for blocks 302eda14cbcSMatt Macywhich are compressed on disk and in memory 303eda14cbcSMatt Macy.Po see the 304eda14cbcSMatt Macy.Sy compression 305eda14cbcSMatt Macyproperty for details 306eda14cbcSMatt Macy.Pc . 307eda14cbcSMatt MacyIf the 308eda14cbcSMatt Macy.Sy lz4_compress 309eda14cbcSMatt Macyfeature is active on the sending system, then the receiving system must have 310eda14cbcSMatt Macythat feature enabled as well. 311eda14cbcSMatt MacyIf the 312eda14cbcSMatt Macy.Sy large_blocks 313eda14cbcSMatt Macyfeature is enabled on the sending system but the 314eda14cbcSMatt Macy.Fl L 315eda14cbcSMatt Macyoption is not supplied in conjunction with 316eda14cbcSMatt Macy.Fl c , 317eda14cbcSMatt Macythen the data will be decompressed before sending so it can be split into 318eda14cbcSMatt Macysmaller block sizes. 319eda14cbcSMatt Macy.It Fl w, -raw 320eda14cbcSMatt MacyFor encrypted datasets, send data exactly as it exists on disk. This allows 321eda14cbcSMatt Macybackups to be taken even if encryption keys are not currently loaded. The 322eda14cbcSMatt Macybackup may then be received on an untrusted machine since that machine will 323eda14cbcSMatt Macynot have the encryption keys to read the protected data or alter it without 324eda14cbcSMatt Macybeing detected. Upon being received, the dataset will have the same encryption 325eda14cbcSMatt Macykeys as it did on the send side, although the 326eda14cbcSMatt Macy.Sy keylocation 327eda14cbcSMatt Macyproperty will be defaulted to 328eda14cbcSMatt Macy.Sy prompt 329eda14cbcSMatt Macyif not otherwise provided. For unencrypted datasets, this flag will be 330eda14cbcSMatt Macyequivalent to 331eda14cbcSMatt Macy.Fl Lec . 332eda14cbcSMatt MacyNote that if you do not use this flag for sending encrypted datasets, data will 333eda14cbcSMatt Macybe sent unencrypted and may be re-encrypted with a different encryption key on 334eda14cbcSMatt Macythe receiving system, which will disable the ability to do a raw send to that 335eda14cbcSMatt Macysystem for incrementals. 336eda14cbcSMatt Macy.It Fl e, -embed 337eda14cbcSMatt MacyGenerate a more compact stream by using 338eda14cbcSMatt Macy.Sy WRITE_EMBEDDED 339eda14cbcSMatt Macyrecords for blocks which are stored more compactly on disk by the 340eda14cbcSMatt Macy.Sy embedded_data 341eda14cbcSMatt Macypool feature. 342eda14cbcSMatt MacyThis flag has no effect if the 343eda14cbcSMatt Macy.Sy embedded_data 344eda14cbcSMatt Macyfeature is disabled. 345eda14cbcSMatt MacyThe receiving system must have the 346eda14cbcSMatt Macy.Sy embedded_data 347eda14cbcSMatt Macyfeature enabled. 348eda14cbcSMatt MacyIf the 349eda14cbcSMatt Macy.Sy lz4_compress 350eda14cbcSMatt Macyfeature is active on the sending system, then the receiving system must have 351eda14cbcSMatt Macythat feature enabled as well. Datasets that are sent with this flag may not be 352eda14cbcSMatt Macyreceived as an encrypted dataset, since encrypted datasets cannot use the 353eda14cbcSMatt Macy.Sy embedded_data 354eda14cbcSMatt Macyfeature. 355eda14cbcSMatt MacySee 356eda14cbcSMatt Macy.Xr zpool-features 5 357eda14cbcSMatt Macyfor details on ZFS feature flags and the 358eda14cbcSMatt Macy.Sy embedded_data 359eda14cbcSMatt Macyfeature. 360eda14cbcSMatt Macy.It Fl i Ar snapshot Ns | Ns Ar bookmark 361eda14cbcSMatt MacyGenerate an incremental send stream. 362eda14cbcSMatt MacyThe incremental source must be an earlier snapshot in the destination's history. 363eda14cbcSMatt MacyIt will commonly be an earlier snapshot in the destination's file system, in 364eda14cbcSMatt Macywhich case it can be specified as the last component of the name 365eda14cbcSMatt Macy.Po the 366eda14cbcSMatt Macy.Sy # 367eda14cbcSMatt Macyor 368eda14cbcSMatt Macy.Sy @ 369eda14cbcSMatt Macycharacter and following 370eda14cbcSMatt Macy.Pc . 371eda14cbcSMatt Macy.Pp 372eda14cbcSMatt MacyIf the incremental target is a clone, the incremental source can be the origin 373eda14cbcSMatt Macysnapshot, or an earlier snapshot in the origin's filesystem, or the origin's 374eda14cbcSMatt Macyorigin, etc. 375eda14cbcSMatt Macy.It Fl n, -dryrun 376eda14cbcSMatt MacyDo a dry-run 377eda14cbcSMatt Macy.Pq Qq No-op 378eda14cbcSMatt Macysend. 379eda14cbcSMatt MacyDo not generate any actual send data. 380eda14cbcSMatt MacyThis is useful in conjunction with the 381eda14cbcSMatt Macy.Fl v 382eda14cbcSMatt Macyor 383eda14cbcSMatt Macy.Fl P 384eda14cbcSMatt Macyflags to determine what data will be sent. 385eda14cbcSMatt MacyIn this case, the verbose output will be written to standard output 386eda14cbcSMatt Macy.Po contrast with a non-dry-run, where the stream is written to standard output 387eda14cbcSMatt Macyand the verbose output goes to standard error 388eda14cbcSMatt Macy.Pc . 389eda14cbcSMatt Macy.It Fl v, -verbose 390eda14cbcSMatt MacyPrint verbose information about the stream package generated. 391eda14cbcSMatt MacyThis information includes a per-second report of how much data has been sent. 392eda14cbcSMatt Macy.El 393eda14cbcSMatt Macy.It Xo 394*7877fdebSMatt Macy.Nm zfs 395eda14cbcSMatt Macy.Cm send 396eda14cbcSMatt Macy.Fl -redact Ar redaction_bookmark 397eda14cbcSMatt Macy.Op Fl DLPcenpv 398eda14cbcSMatt Macy.br 399eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 400eda14cbcSMatt Macy.Ar snapshot 401eda14cbcSMatt Macy.Xc 402eda14cbcSMatt MacyGenerate a redacted send stream. 403eda14cbcSMatt MacyThis send stream contains all blocks from the snapshot being sent that aren't 404eda14cbcSMatt Macyincluded in the redaction list contained in the bookmark specified by the 405eda14cbcSMatt Macy.Fl -redact 406eda14cbcSMatt Macy(or 407eda14cbcSMatt Macy.Fl -d 408eda14cbcSMatt Macy) flag. 409eda14cbcSMatt MacyThe resulting send stream is said to be redacted with respect to the snapshots 410eda14cbcSMatt Macythe bookmark specified by the 411eda14cbcSMatt Macy.Fl -redact No flag was created with. 412eda14cbcSMatt MacyThe bookmark must have been created by running 413eda14cbcSMatt Macy.Sy zfs redact 414eda14cbcSMatt Macyon the snapshot being sent. 415eda14cbcSMatt Macy.sp 416eda14cbcSMatt MacyThis feature can be used to allow clones of a filesystem to be made available on 417eda14cbcSMatt Macya remote system, in the case where their parent need not (or needs to not) be 418eda14cbcSMatt Macyusable. 419eda14cbcSMatt MacyFor example, if a filesystem contains sensitive data, and it has clones where 420eda14cbcSMatt Macythat sensitive data has been secured or replaced with dummy data, redacted sends 421eda14cbcSMatt Macycan be used to replicate the secured data without replicating the original 422eda14cbcSMatt Macysensitive data, while still sharing all possible blocks. 423eda14cbcSMatt MacyA snapshot that has been redacted with respect to a set of snapshots will 424eda14cbcSMatt Macycontain all blocks referenced by at least one snapshot in the set, but will 425eda14cbcSMatt Macycontain none of the blocks referenced by none of the snapshots in the set. 426eda14cbcSMatt MacyIn other words, if all snapshots in the set have modified a given block in the 427eda14cbcSMatt Macyparent, that block will not be sent; but if one or more snapshots have not 428eda14cbcSMatt Macymodified a block in the parent, they will still reference the parent's block, so 429eda14cbcSMatt Macythat block will be sent. 430eda14cbcSMatt MacyNote that only user data will be redacted. 431eda14cbcSMatt Macy.sp 432eda14cbcSMatt MacyWhen the redacted send stream is received, we will generate a redacted 433eda14cbcSMatt Macysnapshot. 434eda14cbcSMatt MacyDue to the nature of redaction, a redacted dataset can only be used in the 435eda14cbcSMatt Macyfollowing ways: 436eda14cbcSMatt Macy.sp 437eda14cbcSMatt Macy1. To receive, as a clone, an incremental send from the original snapshot to one 438eda14cbcSMatt Macyof the snapshots it was redacted with respect to. 439eda14cbcSMatt MacyIn this case, the stream will produce a valid dataset when received because all 440eda14cbcSMatt Macyblocks that were redacted in the parent are guaranteed to be present in the 441eda14cbcSMatt Macychild's send stream. 442eda14cbcSMatt MacyThis use case will produce a normal snapshot, which can be used just like other 443eda14cbcSMatt Macysnapshots. 444eda14cbcSMatt Macy.sp 445eda14cbcSMatt Macy2. To receive an incremental send from the original snapshot to something 446eda14cbcSMatt Macyredacted with respect to a subset of the set of snapshots the initial snapshot 447eda14cbcSMatt Macywas redacted with respect to. 448eda14cbcSMatt MacyIn this case, each block that was redacted in the original is still redacted 449eda14cbcSMatt Macy(redacting with respect to additional snapshots causes less data to be redacted 450eda14cbcSMatt Macy(because the snapshots define what is permitted, and everything else is 451eda14cbcSMatt Macyredacted)). 452eda14cbcSMatt MacyThis use case will produce a new redacted snapshot. 453eda14cbcSMatt Macy.sp 454eda14cbcSMatt Macy3. To receive an incremental send from a redaction bookmark of the original 455eda14cbcSMatt Macysnapshot that was created when redacting with respect to a subset of the set of 456eda14cbcSMatt Macysnapshots the initial snapshot was created with respect to 457eda14cbcSMatt Macyanything else. 458eda14cbcSMatt MacyA send stream from such a redaction bookmark will contain all of the blocks 459eda14cbcSMatt Macynecessary to fill in any redacted data, should it be needed, because the sending 460eda14cbcSMatt Macysystem is aware of what blocks were originally redacted. 461eda14cbcSMatt MacyThis will either produce a normal snapshot or a redacted one, depending on 462eda14cbcSMatt Macywhether the new send stream is redacted. 463eda14cbcSMatt Macy.sp 464eda14cbcSMatt Macy4. To receive an incremental send from a redacted version of the initial 465eda14cbcSMatt Macysnapshot that is redacted with respect to a subject of the set of snapshots the 466eda14cbcSMatt Macyinitial snapshot was created with respect to. 467eda14cbcSMatt MacyA send stream from a compatible redacted dataset will contain all of the blocks 468eda14cbcSMatt Macynecessary to fill in any redacted data. 469eda14cbcSMatt MacyThis will either produce a normal snapshot or a redacted one, depending on 470eda14cbcSMatt Macywhether the new send stream is redacted. 471eda14cbcSMatt Macy.sp 472eda14cbcSMatt Macy5. To receive a full send as a clone of the redacted snapshot. 473eda14cbcSMatt MacySince the stream is a full send, it definitionally contains all the data needed 474eda14cbcSMatt Macyto create a new dataset. 475eda14cbcSMatt MacyThis use case will either produce a normal snapshot or a redacted one, depending 476eda14cbcSMatt Macyon whether the full send stream was redacted. 477eda14cbcSMatt Macy.sp 478eda14cbcSMatt MacyThese restrictions are detected and enforced by \fBzfs receive\fR; a 479eda14cbcSMatt Macyredacted send stream will contain the list of snapshots that the stream is 480eda14cbcSMatt Macyredacted with respect to. 481eda14cbcSMatt MacyThese are stored with the redacted snapshot, and are used to detect and 482eda14cbcSMatt Macycorrectly handle the cases above. Note that for technical reasons, raw sends 483eda14cbcSMatt Macyand redacted sends cannot be combined at this time. 484eda14cbcSMatt Macy.It Xo 485*7877fdebSMatt Macy.Nm zfs 486eda14cbcSMatt Macy.Cm send 487eda14cbcSMatt Macy.Op Fl Penv 488eda14cbcSMatt Macy.Fl t 489eda14cbcSMatt Macy.Ar receive_resume_token 490eda14cbcSMatt Macy.Xc 491eda14cbcSMatt MacyCreates a send stream which resumes an interrupted receive. 492eda14cbcSMatt MacyThe 493eda14cbcSMatt Macy.Ar receive_resume_token 494eda14cbcSMatt Macyis the value of this property on the filesystem or volume that was being 495eda14cbcSMatt Macyreceived into. 496eda14cbcSMatt MacySee the documentation for 497eda14cbcSMatt Macy.Sy zfs receive -s 498eda14cbcSMatt Macyfor more details. 499eda14cbcSMatt Macy.It Xo 500*7877fdebSMatt Macy.Nm zfs 501eda14cbcSMatt Macy.Cm send 502eda14cbcSMatt Macy.Op Fl Pnv 503eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 504eda14cbcSMatt Macy.Fl S 505eda14cbcSMatt Macy.Ar filesystem 506eda14cbcSMatt Macy.Xc 507eda14cbcSMatt MacyGenerate a send stream from a dataset that has been partially received. 508eda14cbcSMatt Macy.Bl -tag -width "-L" 509eda14cbcSMatt Macy.It Fl S, -saved 510eda14cbcSMatt MacyThis flag requires that the specified filesystem previously received a resumable 511eda14cbcSMatt Macysend that did not finish and was interrupted. In such scenarios this flag 512eda14cbcSMatt Macyenables the user to send this partially received state. Using this flag will 513eda14cbcSMatt Macyalways use the last fully received snapshot as the incremental source if it 514eda14cbcSMatt Macyexists. 515eda14cbcSMatt Macy.El 516eda14cbcSMatt Macy.It Xo 517*7877fdebSMatt Macy.Nm zfs 518eda14cbcSMatt Macy.Cm redact 519eda14cbcSMatt Macy.Ar snapshot redaction_bookmark 520eda14cbcSMatt Macy.Ar redaction_snapshot Ns ... 521eda14cbcSMatt Macy.Xc 522eda14cbcSMatt MacyGenerate a new redaction bookmark. 523eda14cbcSMatt MacyIn addition to the typical bookmark information, a redaction bookmark contains 524eda14cbcSMatt Macythe list of redacted blocks and the list of redaction snapshots specified. 525eda14cbcSMatt MacyThe redacted blocks are blocks in the snapshot which are not referenced by any 526eda14cbcSMatt Macyof the redaction snapshots. 527eda14cbcSMatt MacyThese blocks are found by iterating over the metadata in each redaction snapshot 528eda14cbcSMatt Macyto determine what has been changed since the target snapshot. 529eda14cbcSMatt MacyRedaction is designed to support redacted zfs sends; see the entry for 530eda14cbcSMatt Macy.Sy zfs send 531eda14cbcSMatt Macyfor more information on the purpose of this operation. 532eda14cbcSMatt MacyIf a redact operation fails partway through (due to an error or a system 533eda14cbcSMatt Macyfailure), the redaction can be resumed by rerunning the same command. 534eda14cbcSMatt Macy.El 535eda14cbcSMatt Macy.Ss Redaction 536eda14cbcSMatt MacyZFS has support for a limited version of data subsetting, in the form of 537eda14cbcSMatt Macyredaction. Using the 538eda14cbcSMatt Macy.Sy zfs redact 539eda14cbcSMatt Macycommand, a 540eda14cbcSMatt Macy.Sy redaction bookmark 541eda14cbcSMatt Macycan be created that stores a list of blocks containing sensitive information. When 542eda14cbcSMatt Macyprovided to 543eda14cbcSMatt Macy.Sy zfs 544eda14cbcSMatt Macy.Sy send , 545eda14cbcSMatt Macythis causes a 546eda14cbcSMatt Macy.Sy redacted send 547eda14cbcSMatt Macyto occur. Redacted sends omit the blocks containing sensitive information, 548eda14cbcSMatt Macyreplacing them with REDACT records. When these send streams are received, a 549eda14cbcSMatt Macy.Sy redacted dataset 550eda14cbcSMatt Macyis created. A redacted dataset cannot be mounted by default, since it is 551eda14cbcSMatt Macyincomplete. It can be used to receive other send streams. In this way datasets 552eda14cbcSMatt Macycan be used for data backup and replication, with all the benefits that zfs send 553eda14cbcSMatt Macyand receive have to offer, while protecting sensitive information from being 554eda14cbcSMatt Macystored on less-trusted machines or services. 555eda14cbcSMatt Macy.Pp 556eda14cbcSMatt MacyFor the purposes of redaction, there are two steps to the process. A redact 557eda14cbcSMatt Macystep, and a send/receive step. First, a redaction bookmark is created. This is 558eda14cbcSMatt Macydone by providing the 559eda14cbcSMatt Macy.Sy zfs redact 560eda14cbcSMatt Macycommand with a parent snapshot, a bookmark to be created, and a number of 561eda14cbcSMatt Macyredaction snapshots. These redaction snapshots must be descendants of the 562eda14cbcSMatt Macyparent snapshot, and they should modify data that is considered sensitive in 563eda14cbcSMatt Macysome way. Any blocks of data modified by all of the redaction snapshots will 564eda14cbcSMatt Macybe listed in the redaction bookmark, because it represents the truly sensitive 565eda14cbcSMatt Macyinformation. When it comes to the send step, the send process will not send 566eda14cbcSMatt Macythe blocks listed in the redaction bookmark, instead replacing them with 567eda14cbcSMatt MacyREDACT records. When received on the target system, this will create a 568eda14cbcSMatt Macyredacted dataset, missing the data that corresponds to the blocks in the 569eda14cbcSMatt Macyredaction bookmark on the sending system. The incremental send streams from 570eda14cbcSMatt Macythe original parent to the redaction snapshots can then also be received on 571eda14cbcSMatt Macythe target system, and this will produce a complete snapshot that can be used 572eda14cbcSMatt Macynormally. Incrementals from one snapshot on the parent filesystem and another 573eda14cbcSMatt Macycan also be done by sending from the redaction bookmark, rather than the 574eda14cbcSMatt Macysnapshots themselves. 575eda14cbcSMatt Macy.Pp 576eda14cbcSMatt MacyIn order to make the purpose of the feature more clear, an example is 577eda14cbcSMatt Macyprovided. Consider a zfs filesystem containing four files. These files 578eda14cbcSMatt Macyrepresent information for an online shopping service. One file contains a list 579eda14cbcSMatt Macyof usernames and passwords, another contains purchase histories, a third 580eda14cbcSMatt Macycontains click tracking data, and a fourth contains user preferences. The 581eda14cbcSMatt Macyowner of this data wants to make it available for their development teams to 582eda14cbcSMatt Macytest against, and their market research teams to do analysis on. The 583eda14cbcSMatt Macydevelopment teams need information about user preferences and the click 584eda14cbcSMatt Macytracking data, while the market research teams need information about purchase 585eda14cbcSMatt Macyhistories and user preferences. Neither needs access to the usernames and 586eda14cbcSMatt Macypasswords. However, because all of this data is stored in one ZFS filesystem, 587eda14cbcSMatt Macyit must all be sent and received together. In addition, the owner of the data 588eda14cbcSMatt Macywants to take advantage of features like compression, checksumming, and 589eda14cbcSMatt Macysnapshots, so they do want to continue to use ZFS to store and transmit their 590eda14cbcSMatt Macydata. Redaction can help them do so. First, they would make two clones of a 591eda14cbcSMatt Macysnapshot of the data on the source. In one clone, they create the setup they 592eda14cbcSMatt Macywant their market research team to see; they delete the usernames and 593eda14cbcSMatt Macypasswords file, and overwrite the click tracking data with dummy 594eda14cbcSMatt Macyinformation. In another, they create the setup they want the development teams 595eda14cbcSMatt Macyto see, by replacing the passwords with fake information and replacing the 596eda14cbcSMatt Macypurchase histories with randomly generated ones. They would then create a 597eda14cbcSMatt Macyredaction bookmark on the parent snapshot, using snapshots on the two clones 598eda14cbcSMatt Macyas redaction snapshots. The parent can then be sent, redacted, to the target 599eda14cbcSMatt Macyserver where the research and development teams have access. Finally, 600eda14cbcSMatt Macyincremental sends from the parent snapshot to each of the clones can be send 601eda14cbcSMatt Macyto and received on the target server; these snapshots are identical to the 602eda14cbcSMatt Macyones on the source, and are ready to be used, while the parent snapshot on the 603eda14cbcSMatt Macytarget contains none of the username and password data present on the source, 604eda14cbcSMatt Macybecause it was removed by the redacted send operation. 605eda14cbcSMatt Macy.Sh SEE ALSO 606eda14cbcSMatt Macy.Xr zfs-bookmark 8 , 607eda14cbcSMatt Macy.Xr zfs-receive 8 , 608eda14cbcSMatt Macy.Xr zfs-redact 8 , 609eda14cbcSMatt Macy.Xr zfs-snapshot 8 610