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