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 9271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0. 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.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. 22eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> 23eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. 24eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 25eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. 26eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved. 27eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com] 28eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved. 29eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc. 30eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc. 317a7741afSMartin Matuska.\" Copyright (c) 2024, Klara, Inc. 32eda14cbcSMatt Macy.\" 337a7741afSMartin Matuska.Dd October 2, 2024 34eda14cbcSMatt Macy.Dt ZFS-SEND 8 35eda14cbcSMatt Macy.Os 3616038816SMartin Matuska. 37eda14cbcSMatt Macy.Sh NAME 387877fdebSMatt Macy.Nm zfs-send 3916038816SMartin Matuska.Nd generate backup stream of ZFS dataset 40eda14cbcSMatt Macy.Sh SYNOPSIS 417877fdebSMatt Macy.Nm zfs 42eda14cbcSMatt Macy.Cm send 4315f0b8c3SMartin Matuska.Op Fl DLPVbcehnpsvw 44716fd348SMartin Matuska.Op Fl R Op Fl X Ar dataset Ns Oo , Ns Ar dataset Oc Ns … 45eda14cbcSMatt Macy.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot 46eda14cbcSMatt Macy.Ar snapshot 477877fdebSMatt Macy.Nm zfs 48eda14cbcSMatt Macy.Cm send 4915f0b8c3SMartin Matuska.Op Fl DLPVcensvw 50eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 51eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 527877fdebSMatt Macy.Nm zfs 53eda14cbcSMatt Macy.Cm send 54eda14cbcSMatt Macy.Fl -redact Ar redaction_bookmark 5515f0b8c3SMartin Matuska.Op Fl DLPVcenpv 56eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 57eda14cbcSMatt Macy.Ar snapshot 587877fdebSMatt Macy.Nm zfs 59eda14cbcSMatt Macy.Cm send 6015f0b8c3SMartin Matuska.Op Fl PVenv 61eda14cbcSMatt Macy.Fl t 62eda14cbcSMatt Macy.Ar receive_resume_token 637877fdebSMatt Macy.Nm zfs 64eda14cbcSMatt Macy.Cm send 6515f0b8c3SMartin Matuska.Op Fl PVnv 66eda14cbcSMatt Macy.Fl S Ar filesystem 677877fdebSMatt Macy.Nm zfs 68eda14cbcSMatt Macy.Cm redact 69eda14cbcSMatt Macy.Ar snapshot redaction_bookmark 7016038816SMartin Matuska.Ar redaction_snapshot Ns … 7116038816SMartin Matuska. 72eda14cbcSMatt Macy.Sh DESCRIPTION 73eda14cbcSMatt Macy.Bl -tag -width "" 74eda14cbcSMatt Macy.It Xo 757877fdebSMatt Macy.Nm zfs 76eda14cbcSMatt Macy.Cm send 7715f0b8c3SMartin Matuska.Op Fl DLPVbcehnpsvw 78716fd348SMartin Matuska.Op Fl R Op Fl X Ar dataset Ns Oo , Ns Ar dataset Oc Ns … 79eda14cbcSMatt Macy.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot 80eda14cbcSMatt Macy.Ar snapshot 81eda14cbcSMatt Macy.Xc 82eda14cbcSMatt MacyCreates a stream representation of the second 83eda14cbcSMatt Macy.Ar snapshot , 84eda14cbcSMatt Macywhich is written to standard output. 85eda14cbcSMatt MacyThe output can be redirected to a file or to a different system 86eda14cbcSMatt Macy.Po for example, using 87eda14cbcSMatt Macy.Xr ssh 1 88eda14cbcSMatt Macy.Pc . 89eda14cbcSMatt MacyBy default, a full stream is generated. 90eda14cbcSMatt Macy.Bl -tag -width "-D" 91eda14cbcSMatt Macy.It Fl D , -dedup 92eda14cbcSMatt MacyDeduplicated send is no longer supported. 93eda14cbcSMatt MacyThis flag is accepted for backwards compatibility, but a regular, 94eda14cbcSMatt Macynon-deduplicated stream will be generated. 95eda14cbcSMatt Macy.It Fl I Ar snapshot 96eda14cbcSMatt MacyGenerate a stream package that sends all intermediary snapshots from the first 97eda14cbcSMatt Macysnapshot to the second snapshot. 98eda14cbcSMatt MacyFor example, 99eda14cbcSMatt Macy.Fl I Em @a Em fs@d 100eda14cbcSMatt Macyis similar to 101eda14cbcSMatt Macy.Fl i Em @a Em fs@b Ns \&; Fl i Em @b Em fs@c Ns \&; Fl i Em @c Em fs@d . 102eda14cbcSMatt MacyThe incremental source may be specified as with the 103eda14cbcSMatt Macy.Fl i 104eda14cbcSMatt Macyoption. 105eda14cbcSMatt Macy.It Fl L , -large-block 106716fd348SMartin MatuskaGenerate a stream which may contain blocks larger than 128 KiB. 107eda14cbcSMatt MacyThis flag has no effect if the 108eda14cbcSMatt Macy.Sy large_blocks 109eda14cbcSMatt Macypool feature is disabled, or if the 110eda14cbcSMatt Macy.Sy recordsize 111716fd348SMartin Matuskaproperty of this filesystem has never been set above 128 KiB. 112eda14cbcSMatt MacyThe receiving system must have the 113eda14cbcSMatt Macy.Sy large_blocks 114eda14cbcSMatt Macypool feature enabled as well. 1157a7741afSMartin MatuskaThis flag is required if the 1167a7741afSMartin Matuska.Sy large_microzap 1177a7741afSMartin Matuskapool feature is active. 118eda14cbcSMatt MacySee 1193ff01b23SMartin Matuska.Xr zpool-features 7 120eda14cbcSMatt Macyfor details on ZFS feature flags and the 121eda14cbcSMatt Macy.Sy large_blocks 122eda14cbcSMatt Macyfeature. 123eda14cbcSMatt Macy.It Fl P , -parsable 124eda14cbcSMatt MacyPrint machine-parsable verbose information about the stream package generated. 125eda14cbcSMatt Macy.It Fl R , -replicate 126eda14cbcSMatt MacyGenerate a replication stream package, which will replicate the specified 127eda14cbcSMatt Macyfile system, and all descendent file systems, up to the named snapshot. 128eda14cbcSMatt MacyWhen received, all properties, snapshots, descendent file systems, and clones 129eda14cbcSMatt Macyare preserved. 130eda14cbcSMatt Macy.Pp 131eda14cbcSMatt MacyIf the 132eda14cbcSMatt Macy.Fl i 133eda14cbcSMatt Macyor 134eda14cbcSMatt Macy.Fl I 135eda14cbcSMatt Macyflags are used in conjunction with the 136eda14cbcSMatt Macy.Fl R 137eda14cbcSMatt Macyflag, an incremental replication stream is generated. 138eda14cbcSMatt MacyThe current values of properties, and current snapshot and file system names are 139eda14cbcSMatt Macyset when the stream is received. 140eda14cbcSMatt MacyIf the 141eda14cbcSMatt Macy.Fl F 142eda14cbcSMatt Macyflag is specified when this stream is received, snapshots and file systems that 14316038816SMartin Matuskado not exist on the sending side are destroyed. 14416038816SMartin MatuskaIf the 145eda14cbcSMatt Macy.Fl R 146eda14cbcSMatt Macyflag is used to send encrypted datasets, then 147eda14cbcSMatt Macy.Fl w 148eda14cbcSMatt Macymust also be specified. 14915f0b8c3SMartin Matuska.It Fl V , -proctitle 15015f0b8c3SMartin MatuskaSet the process title to a per-second report of how much data has been sent. 151716fd348SMartin Matuska.It Fl X , -exclude Ar dataset Ns Oo , Ns Ar dataset Oc Ns … 152716fd348SMartin MatuskaWith 153716fd348SMartin Matuska.Fl R , 154da5137abSMartin Matuska.Fl X 155716fd348SMartin Matuskaspecifies a set of datasets (and, hence, their descendants), 156716fd348SMartin Matuskato be excluded from the send stream. 157716fd348SMartin MatuskaThe root dataset may not be excluded. 158716fd348SMartin Matuska.Fl X Ar a Fl X Ar b 159716fd348SMartin Matuskais equivalent to 160716fd348SMartin Matuska.Fl X Ar a , Ns Ar b . 161eda14cbcSMatt Macy.It Fl e , -embed 162eda14cbcSMatt MacyGenerate a more compact stream by using 163eda14cbcSMatt Macy.Sy WRITE_EMBEDDED 164eda14cbcSMatt Macyrecords for blocks which are stored more compactly on disk by the 165eda14cbcSMatt Macy.Sy embedded_data 166eda14cbcSMatt Macypool feature. 167eda14cbcSMatt MacyThis flag has no effect if the 168eda14cbcSMatt Macy.Sy embedded_data 169eda14cbcSMatt Macyfeature is disabled. 170eda14cbcSMatt MacyThe receiving system must have the 171eda14cbcSMatt Macy.Sy embedded_data 172eda14cbcSMatt Macyfeature enabled. 173eda14cbcSMatt MacyIf the 174eda14cbcSMatt Macy.Sy lz4_compress 175eda14cbcSMatt Macyfeature is active on the sending system, then the receiving system must have 17616038816SMartin Matuskathat feature enabled as well. 17716038816SMartin MatuskaDatasets that are sent with this flag may not be 178eda14cbcSMatt Macyreceived as an encrypted dataset, since encrypted datasets cannot use the 179eda14cbcSMatt Macy.Sy embedded_data 180eda14cbcSMatt Macyfeature. 181eda14cbcSMatt MacySee 1823ff01b23SMartin Matuska.Xr zpool-features 7 183eda14cbcSMatt Macyfor details on ZFS feature flags and the 184eda14cbcSMatt Macy.Sy embedded_data 185eda14cbcSMatt Macyfeature. 186eda14cbcSMatt Macy.It Fl b , -backup 187eda14cbcSMatt MacySends only received property values whether or not they are overridden by local 18816038816SMartin Matuskasettings, but only if the dataset has ever been received. 18916038816SMartin MatuskaUse this option when you want 190eda14cbcSMatt Macy.Nm zfs Cm receive 191eda14cbcSMatt Macyto restore received properties backed up on the sent dataset and to avoid 192eda14cbcSMatt Macysending local settings that may have nothing to do with the source dataset, 193eda14cbcSMatt Macybut only with how the data is backed up. 194eda14cbcSMatt Macy.It Fl c , -compressed 195eda14cbcSMatt MacyGenerate a more compact stream by using compressed WRITE records for blocks 196eda14cbcSMatt Macywhich are compressed on disk and in memory 197eda14cbcSMatt Macy.Po see the 198eda14cbcSMatt Macy.Sy compression 199eda14cbcSMatt Macyproperty for details 200eda14cbcSMatt Macy.Pc . 201eda14cbcSMatt MacyIf the 202eda14cbcSMatt Macy.Sy lz4_compress 203eda14cbcSMatt Macyfeature is active on the sending system, then the receiving system must have 204eda14cbcSMatt Macythat feature enabled as well. 205eda14cbcSMatt MacyIf the 206eda14cbcSMatt Macy.Sy large_blocks 207eda14cbcSMatt Macyfeature is enabled on the sending system but the 208eda14cbcSMatt Macy.Fl L 209eda14cbcSMatt Macyoption is not supplied in conjunction with 210eda14cbcSMatt Macy.Fl c , 211eda14cbcSMatt Macythen the data will be decompressed before sending so it can be split into 21216038816SMartin Matuskasmaller block sizes. 21316038816SMartin MatuskaStreams sent with 2149db44a8eSMartin Matuska.Fl c 2159db44a8eSMartin Matuskawill not have their data recompressed on the receiver side using 21616038816SMartin Matuska.Fl o Sy compress Ns = Ar value . 21716038816SMartin MatuskaThe data will stay compressed as it was from the sender. 21816038816SMartin MatuskaThe new compression property will be set for future data. 2196ba2210eSMartin MatuskaNote that uncompressed data from the sender will still attempt to 2206ba2210eSMartin Matuskacompress on the receiver, unless you specify 2216ba2210eSMartin Matuska.Fl o Sy compress Ns = Em off . 222eda14cbcSMatt Macy.It Fl w , -raw 22316038816SMartin MatuskaFor encrypted datasets, send data exactly as it exists on disk. 224bb2d13b6SMartin MatuskaThis allows backups to be taken even if encryption keys are not currently 225bb2d13b6SMartin Matuskaloaded. 22616038816SMartin MatuskaThe backup may then be received on an untrusted machine since that machine will 227eda14cbcSMatt Macynot have the encryption keys to read the protected data or alter it without 22816038816SMartin Matuskabeing detected. 22916038816SMartin MatuskaUpon being received, the dataset will have the same encryption 230eda14cbcSMatt Macykeys as it did on the send side, although the 231eda14cbcSMatt Macy.Sy keylocation 232eda14cbcSMatt Macyproperty will be defaulted to 233eda14cbcSMatt Macy.Sy prompt 23416038816SMartin Matuskaif not otherwise provided. 23516038816SMartin MatuskaFor unencrypted datasets, this flag will be equivalent to 236eda14cbcSMatt Macy.Fl Lec . 237eda14cbcSMatt MacyNote that if you do not use this flag for sending encrypted datasets, data will 238eda14cbcSMatt Macybe sent unencrypted and may be re-encrypted with a different encryption key on 239eda14cbcSMatt Macythe receiving system, which will disable the ability to do a raw send to that 240eda14cbcSMatt Macysystem for incrementals. 241eda14cbcSMatt Macy.It Fl h , -holds 242eda14cbcSMatt MacyGenerate a stream package that includes any snapshot holds (created with the 24316038816SMartin Matuska.Nm zfs Cm hold 244eda14cbcSMatt Macycommand), and indicating to 24516038816SMartin Matuska.Nm zfs Cm receive 246eda14cbcSMatt Macythat the holds be applied to the dataset on the receiving system. 247eda14cbcSMatt Macy.It Fl i Ar snapshot 248eda14cbcSMatt MacyGenerate an incremental stream from the first 249eda14cbcSMatt Macy.Ar snapshot 250eda14cbcSMatt Macy.Pq the incremental source 251eda14cbcSMatt Macyto the second 252eda14cbcSMatt Macy.Ar snapshot 253eda14cbcSMatt Macy.Pq the incremental target . 254eda14cbcSMatt MacyThe incremental source can be specified as the last component of the snapshot 255eda14cbcSMatt Macyname 256eda14cbcSMatt Macy.Po the 257eda14cbcSMatt Macy.Sy @ 258eda14cbcSMatt Macycharacter and following 259eda14cbcSMatt Macy.Pc 260eda14cbcSMatt Macyand it is assumed to be from the same file system as the incremental target. 261eda14cbcSMatt Macy.Pp 262eda14cbcSMatt MacyIf the destination is a clone, the source may be the origin snapshot, which must 263eda14cbcSMatt Macybe fully specified 264eda14cbcSMatt Macy.Po for example, 265eda14cbcSMatt Macy.Em pool/fs@origin , 266eda14cbcSMatt Macynot just 267eda14cbcSMatt Macy.Em @origin 268eda14cbcSMatt Macy.Pc . 269eda14cbcSMatt Macy.It Fl n , -dryrun 270eda14cbcSMatt MacyDo a dry-run 271eda14cbcSMatt Macy.Pq Qq No-op 272eda14cbcSMatt Macysend. 273eda14cbcSMatt MacyDo not generate any actual send data. 274eda14cbcSMatt MacyThis is useful in conjunction with the 275eda14cbcSMatt Macy.Fl v 276eda14cbcSMatt Macyor 277eda14cbcSMatt Macy.Fl P 278eda14cbcSMatt Macyflags to determine what data will be sent. 279eda14cbcSMatt MacyIn this case, the verbose output will be written to standard output 280eda14cbcSMatt Macy.Po contrast with a non-dry-run, where the stream is written to standard output 281eda14cbcSMatt Macyand the verbose output goes to standard error 282eda14cbcSMatt Macy.Pc . 283eda14cbcSMatt Macy.It Fl p , -props 284eda14cbcSMatt MacyInclude the dataset's properties in the stream. 285eda14cbcSMatt MacyThis flag is implicit when 286eda14cbcSMatt Macy.Fl R 287eda14cbcSMatt Macyis specified. 28816038816SMartin MatuskaThe receiving system must also support this feature. 28916038816SMartin MatuskaSends of encrypted datasets must use 290eda14cbcSMatt Macy.Fl w 291eda14cbcSMatt Macywhen using this flag. 29216038816SMartin Matuska.It Fl s , -skip-missing 29316038816SMartin MatuskaAllows sending a replication stream even when there are snapshots missing in the 29416038816SMartin Matuskahierarchy. 29516038816SMartin MatuskaWhen a snapshot is missing, instead of throwing an error and aborting the send, 296bb2d13b6SMartin Matuskaa warning is printed to the standard error stream and the dataset to which it 297bb2d13b6SMartin Matuskabelongs 29816038816SMartin Matuskaand its descendents are skipped. 29916038816SMartin MatuskaThis flag can only be used in conjunction with 30016038816SMartin Matuska.Fl R . 301eda14cbcSMatt Macy.It Fl v , -verbose 302eda14cbcSMatt MacyPrint verbose information about the stream package generated. 303eda14cbcSMatt MacyThis information includes a per-second report of how much data has been sent. 304315ee00fSMartin MatuskaThe same report can be requested by sending 305315ee00fSMartin Matuska.Dv SIGINFO 306315ee00fSMartin Matuskaor 307315ee00fSMartin Matuska.Dv SIGUSR1 , 308315ee00fSMartin Matuskaregardless of 309315ee00fSMartin Matuska.Fl v . 310eda14cbcSMatt Macy.Pp 311eda14cbcSMatt MacyThe format of the stream is committed. 312eda14cbcSMatt MacyYou will be able to receive your streams on future versions of ZFS. 313eda14cbcSMatt Macy.El 314eda14cbcSMatt Macy.It Xo 3157877fdebSMatt Macy.Nm zfs 316eda14cbcSMatt Macy.Cm send 31715f0b8c3SMartin Matuska.Op Fl DLPVcenvw 318eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 319eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 320eda14cbcSMatt Macy.Xc 321eda14cbcSMatt MacyGenerate a send stream, which may be of a filesystem, and may be incremental 322eda14cbcSMatt Macyfrom a bookmark. 323eda14cbcSMatt MacyIf the destination is a filesystem or volume, the pool must be read-only, or the 324eda14cbcSMatt Macyfilesystem must not be mounted. 325eda14cbcSMatt MacyWhen the stream generated from a filesystem or volume is received, the default 326eda14cbcSMatt Macysnapshot name will be 327eda14cbcSMatt Macy.Qq --head-- . 3283f9d360cSMartin Matuska.Bl -tag -width "-D" 3293f9d360cSMartin Matuska.It Fl D , -dedup 3303f9d360cSMartin MatuskaDeduplicated send is no longer supported. 3313f9d360cSMartin MatuskaThis flag is accepted for backwards compatibility, but a regular, 3323f9d360cSMartin Matuskanon-deduplicated stream will be generated. 333eda14cbcSMatt Macy.It Fl L , -large-block 334716fd348SMartin MatuskaGenerate a stream which may contain blocks larger than 128 KiB. 335eda14cbcSMatt MacyThis flag has no effect if the 336eda14cbcSMatt Macy.Sy large_blocks 337eda14cbcSMatt Macypool feature is disabled, or if the 338eda14cbcSMatt Macy.Sy recordsize 339716fd348SMartin Matuskaproperty of this filesystem has never been set above 128 KiB. 340eda14cbcSMatt MacyThe receiving system must have the 341eda14cbcSMatt Macy.Sy large_blocks 342eda14cbcSMatt Macypool feature enabled as well. 343eda14cbcSMatt MacySee 3443ff01b23SMartin Matuska.Xr zpool-features 7 345eda14cbcSMatt Macyfor details on ZFS feature flags and the 346eda14cbcSMatt Macy.Sy large_blocks 347eda14cbcSMatt Macyfeature. 348eda14cbcSMatt Macy.It Fl P , -parsable 349eda14cbcSMatt MacyPrint machine-parsable verbose information about the stream package generated. 350eda14cbcSMatt Macy.It Fl c , -compressed 351eda14cbcSMatt MacyGenerate a more compact stream by using compressed WRITE records for blocks 352eda14cbcSMatt Macywhich are compressed on disk and in memory 353eda14cbcSMatt Macy.Po see the 354eda14cbcSMatt Macy.Sy compression 355eda14cbcSMatt Macyproperty for details 356eda14cbcSMatt Macy.Pc . 357eda14cbcSMatt MacyIf the 358eda14cbcSMatt Macy.Sy lz4_compress 359eda14cbcSMatt Macyfeature is active on the sending system, then the receiving system must have 360eda14cbcSMatt Macythat feature enabled as well. 361eda14cbcSMatt MacyIf the 362eda14cbcSMatt Macy.Sy large_blocks 363eda14cbcSMatt Macyfeature is enabled on the sending system but the 364eda14cbcSMatt Macy.Fl L 365eda14cbcSMatt Macyoption is not supplied in conjunction with 366eda14cbcSMatt Macy.Fl c , 367eda14cbcSMatt Macythen the data will be decompressed before sending so it can be split into 368eda14cbcSMatt Macysmaller block sizes. 369eda14cbcSMatt Macy.It Fl w , -raw 37016038816SMartin MatuskaFor encrypted datasets, send data exactly as it exists on disk. 371bb2d13b6SMartin MatuskaThis allows backups to be taken even if encryption keys are not currently 372bb2d13b6SMartin Matuskaloaded. 37316038816SMartin MatuskaThe backup may then be received on an untrusted machine since that machine will 374eda14cbcSMatt Macynot have the encryption keys to read the protected data or alter it without 37516038816SMartin Matuskabeing detected. 37616038816SMartin MatuskaUpon being received, the dataset will have the same encryption 377eda14cbcSMatt Macykeys as it did on the send side, although the 378eda14cbcSMatt Macy.Sy keylocation 379eda14cbcSMatt Macyproperty will be defaulted to 380eda14cbcSMatt Macy.Sy prompt 38116038816SMartin Matuskaif not otherwise provided. 38216038816SMartin MatuskaFor unencrypted datasets, this flag will be equivalent to 383eda14cbcSMatt Macy.Fl Lec . 384eda14cbcSMatt MacyNote that if you do not use this flag for sending encrypted datasets, data will 385eda14cbcSMatt Macybe sent unencrypted and may be re-encrypted with a different encryption key on 386eda14cbcSMatt Macythe receiving system, which will disable the ability to do a raw send to that 387eda14cbcSMatt Macysystem for incrementals. 388eda14cbcSMatt Macy.It Fl e , -embed 389eda14cbcSMatt MacyGenerate a more compact stream by using 390eda14cbcSMatt Macy.Sy WRITE_EMBEDDED 391eda14cbcSMatt Macyrecords for blocks which are stored more compactly on disk by the 392eda14cbcSMatt Macy.Sy embedded_data 393eda14cbcSMatt Macypool feature. 394eda14cbcSMatt MacyThis flag has no effect if the 395eda14cbcSMatt Macy.Sy embedded_data 396eda14cbcSMatt Macyfeature is disabled. 397eda14cbcSMatt MacyThe receiving system must have the 398eda14cbcSMatt Macy.Sy embedded_data 399eda14cbcSMatt Macyfeature enabled. 400eda14cbcSMatt MacyIf the 401eda14cbcSMatt Macy.Sy lz4_compress 402eda14cbcSMatt Macyfeature is active on the sending system, then the receiving system must have 40316038816SMartin Matuskathat feature enabled as well. 404bb2d13b6SMartin MatuskaDatasets that are sent with this flag may not be received as an encrypted 405bb2d13b6SMartin Matuskadataset, 40616038816SMartin Matuskasince encrypted datasets cannot use the 407eda14cbcSMatt Macy.Sy embedded_data 408eda14cbcSMatt Macyfeature. 409eda14cbcSMatt MacySee 4103ff01b23SMartin Matuska.Xr zpool-features 7 411eda14cbcSMatt Macyfor details on ZFS feature flags and the 412eda14cbcSMatt Macy.Sy embedded_data 413eda14cbcSMatt Macyfeature. 414eda14cbcSMatt Macy.It Fl i Ar snapshot Ns | Ns Ar bookmark 415eda14cbcSMatt MacyGenerate an incremental send stream. 416eda14cbcSMatt MacyThe incremental source must be an earlier snapshot in the destination's history. 417eda14cbcSMatt MacyIt will commonly be an earlier snapshot in the destination's file system, in 418eda14cbcSMatt Macywhich case it can be specified as the last component of the name 419eda14cbcSMatt Macy.Po the 420eda14cbcSMatt Macy.Sy # 421eda14cbcSMatt Macyor 422eda14cbcSMatt Macy.Sy @ 423eda14cbcSMatt Macycharacter and following 424eda14cbcSMatt Macy.Pc . 425eda14cbcSMatt Macy.Pp 426eda14cbcSMatt MacyIf the incremental target is a clone, the incremental source can be the origin 427eda14cbcSMatt Macysnapshot, or an earlier snapshot in the origin's filesystem, or the origin's 428eda14cbcSMatt Macyorigin, etc. 429eda14cbcSMatt Macy.It Fl n , -dryrun 430eda14cbcSMatt MacyDo a dry-run 431eda14cbcSMatt Macy.Pq Qq No-op 432eda14cbcSMatt Macysend. 433eda14cbcSMatt MacyDo not generate any actual send data. 434eda14cbcSMatt MacyThis is useful in conjunction with the 435eda14cbcSMatt Macy.Fl v 436eda14cbcSMatt Macyor 437eda14cbcSMatt Macy.Fl P 438eda14cbcSMatt Macyflags to determine what data will be sent. 439eda14cbcSMatt MacyIn this case, the verbose output will be written to standard output 440eda14cbcSMatt Macy.Po contrast with a non-dry-run, where the stream is written to standard output 441eda14cbcSMatt Macyand the verbose output goes to standard error 442eda14cbcSMatt Macy.Pc . 443eda14cbcSMatt Macy.It Fl v , -verbose 444eda14cbcSMatt MacyPrint verbose information about the stream package generated. 445eda14cbcSMatt MacyThis information includes a per-second report of how much data has been sent. 446315ee00fSMartin MatuskaThe same report can be requested by sending 447315ee00fSMartin Matuska.Dv SIGINFO 448315ee00fSMartin Matuskaor 449315ee00fSMartin Matuska.Dv SIGUSR1 , 450315ee00fSMartin Matuskaregardless of 451315ee00fSMartin Matuska.Fl v . 452eda14cbcSMatt Macy.El 453eda14cbcSMatt Macy.It Xo 4547877fdebSMatt Macy.Nm zfs 455eda14cbcSMatt Macy.Cm send 456eda14cbcSMatt Macy.Fl -redact Ar redaction_bookmark 45715f0b8c3SMartin Matuska.Op Fl DLPVcenpv 458eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 459eda14cbcSMatt Macy.Ar snapshot 460eda14cbcSMatt Macy.Xc 461eda14cbcSMatt MacyGenerate a redacted send stream. 462eda14cbcSMatt MacyThis send stream contains all blocks from the snapshot being sent that aren't 463eda14cbcSMatt Macyincluded in the redaction list contained in the bookmark specified by the 464eda14cbcSMatt Macy.Fl -redact 465eda14cbcSMatt Macy(or 46616038816SMartin Matuska.Fl d ) 46716038816SMartin Matuskaflag. 468eda14cbcSMatt MacyThe resulting send stream is said to be redacted with respect to the snapshots 469eda14cbcSMatt Macythe bookmark specified by the 470eda14cbcSMatt Macy.Fl -redact No flag was created with . 471eda14cbcSMatt MacyThe bookmark must have been created by running 47216038816SMartin Matuska.Nm zfs Cm redact 473eda14cbcSMatt Macyon the snapshot being sent. 47416038816SMartin Matuska.Pp 475eda14cbcSMatt MacyThis feature can be used to allow clones of a filesystem to be made available on 476eda14cbcSMatt Macya remote system, in the case where their parent need not (or needs to not) be 477eda14cbcSMatt Macyusable. 478eda14cbcSMatt MacyFor example, if a filesystem contains sensitive data, and it has clones where 479eda14cbcSMatt Macythat sensitive data has been secured or replaced with dummy data, redacted sends 480eda14cbcSMatt Macycan be used to replicate the secured data without replicating the original 481eda14cbcSMatt Macysensitive data, while still sharing all possible blocks. 482eda14cbcSMatt MacyA snapshot that has been redacted with respect to a set of snapshots will 483eda14cbcSMatt Macycontain all blocks referenced by at least one snapshot in the set, but will 484eda14cbcSMatt Macycontain none of the blocks referenced by none of the snapshots in the set. 485eda14cbcSMatt MacyIn other words, if all snapshots in the set have modified a given block in the 486eda14cbcSMatt Macyparent, that block will not be sent; but if one or more snapshots have not 487eda14cbcSMatt Macymodified a block in the parent, they will still reference the parent's block, so 488eda14cbcSMatt Macythat block will be sent. 489eda14cbcSMatt MacyNote that only user data will be redacted. 49016038816SMartin Matuska.Pp 491eda14cbcSMatt MacyWhen the redacted send stream is received, we will generate a redacted 492eda14cbcSMatt Macysnapshot. 493eda14cbcSMatt MacyDue to the nature of redaction, a redacted dataset can only be used in the 494eda14cbcSMatt Macyfollowing ways: 49516038816SMartin Matuska.Bl -enum -width "a." 49616038816SMartin Matuska.It 49716038816SMartin MatuskaTo receive, as a clone, an incremental send from the original snapshot to one 498eda14cbcSMatt Macyof the snapshots it was redacted with respect to. 499eda14cbcSMatt MacyIn this case, the stream will produce a valid dataset when received because all 500eda14cbcSMatt Macyblocks that were redacted in the parent are guaranteed to be present in the 501eda14cbcSMatt Macychild's send stream. 502eda14cbcSMatt MacyThis use case will produce a normal snapshot, which can be used just like other 503eda14cbcSMatt Macysnapshots. 50416038816SMartin Matuska. 50516038816SMartin Matuska.It 50616038816SMartin MatuskaTo receive an incremental send from the original snapshot to something 507eda14cbcSMatt Macyredacted with respect to a subset of the set of snapshots the initial snapshot 508eda14cbcSMatt Macywas redacted with respect to. 509eda14cbcSMatt MacyIn this case, each block that was redacted in the original is still redacted 510eda14cbcSMatt Macy(redacting with respect to additional snapshots causes less data to be redacted 511eda14cbcSMatt Macy(because the snapshots define what is permitted, and everything else is 512eda14cbcSMatt Macyredacted)). 513eda14cbcSMatt MacyThis use case will produce a new redacted snapshot. 51416038816SMartin Matuska.It 51516038816SMartin MatuskaTo receive an incremental send from a redaction bookmark of the original 516eda14cbcSMatt Macysnapshot that was created when redacting with respect to a subset of the set of 517eda14cbcSMatt Macysnapshots the initial snapshot was created with respect to 518eda14cbcSMatt Macyanything else. 519eda14cbcSMatt MacyA send stream from such a redaction bookmark will contain all of the blocks 520eda14cbcSMatt Macynecessary to fill in any redacted data, should it be needed, because the sending 521eda14cbcSMatt Macysystem is aware of what blocks were originally redacted. 522eda14cbcSMatt MacyThis will either produce a normal snapshot or a redacted one, depending on 523eda14cbcSMatt Macywhether the new send stream is redacted. 52416038816SMartin Matuska.It 52516038816SMartin MatuskaTo receive an incremental send from a redacted version of the initial 526eda14cbcSMatt Macysnapshot that is redacted with respect to a subject of the set of snapshots the 527eda14cbcSMatt Macyinitial snapshot was created with respect to. 528eda14cbcSMatt MacyA send stream from a compatible redacted dataset will contain all of the blocks 529eda14cbcSMatt Macynecessary to fill in any redacted data. 530eda14cbcSMatt MacyThis will either produce a normal snapshot or a redacted one, depending on 531eda14cbcSMatt Macywhether the new send stream is redacted. 53216038816SMartin Matuska.It 53316038816SMartin MatuskaTo receive a full send as a clone of the redacted snapshot. 534eda14cbcSMatt MacySince the stream is a full send, it definitionally contains all the data needed 535eda14cbcSMatt Macyto create a new dataset. 536eda14cbcSMatt MacyThis use case will either produce a normal snapshot or a redacted one, depending 537eda14cbcSMatt Macyon whether the full send stream was redacted. 53816038816SMartin Matuska.El 53916038816SMartin Matuska.Pp 54016038816SMartin MatuskaThese restrictions are detected and enforced by 54116038816SMartin Matuska.Nm zfs Cm receive ; 54216038816SMartin Matuskaa redacted send stream will contain the list of snapshots that the stream is 543eda14cbcSMatt Macyredacted with respect to. 544eda14cbcSMatt MacyThese are stored with the redacted snapshot, and are used to detect and 54516038816SMartin Matuskacorrectly handle the cases above. 54616038816SMartin MatuskaNote that for technical reasons, 54716038816SMartin Matuskaraw sends and redacted sends cannot be combined at this time. 548eda14cbcSMatt Macy.It Xo 5497877fdebSMatt Macy.Nm zfs 550eda14cbcSMatt Macy.Cm send 55115f0b8c3SMartin Matuska.Op Fl PVenv 552eda14cbcSMatt Macy.Fl t 553eda14cbcSMatt Macy.Ar receive_resume_token 554eda14cbcSMatt Macy.Xc 555eda14cbcSMatt MacyCreates a send stream which resumes an interrupted receive. 556eda14cbcSMatt MacyThe 557eda14cbcSMatt Macy.Ar receive_resume_token 558eda14cbcSMatt Macyis the value of this property on the filesystem or volume that was being 559eda14cbcSMatt Macyreceived into. 560eda14cbcSMatt MacySee the documentation for 56116038816SMartin Matuska.Nm zfs Cm receive Fl s 562eda14cbcSMatt Macyfor more details. 563eda14cbcSMatt Macy.It Xo 5647877fdebSMatt Macy.Nm zfs 565eda14cbcSMatt Macy.Cm send 56615f0b8c3SMartin Matuska.Op Fl PVnv 567eda14cbcSMatt Macy.Op Fl i Ar snapshot Ns | Ns Ar bookmark 568eda14cbcSMatt Macy.Fl S 569eda14cbcSMatt Macy.Ar filesystem 570eda14cbcSMatt Macy.Xc 571eda14cbcSMatt MacyGenerate a send stream from a dataset that has been partially received. 572eda14cbcSMatt Macy.Bl -tag -width "-L" 573eda14cbcSMatt Macy.It Fl S , -saved 574eda14cbcSMatt MacyThis flag requires that the specified filesystem previously received a resumable 57516038816SMartin Matuskasend that did not finish and was interrupted. 57616038816SMartin MatuskaIn such scenarios this flag 57716038816SMartin Matuskaenables the user to send this partially received state. 57816038816SMartin MatuskaUsing this flag will always use the last fully received snapshot 57916038816SMartin Matuskaas the incremental source if it exists. 580eda14cbcSMatt Macy.El 581eda14cbcSMatt Macy.It Xo 5827877fdebSMatt Macy.Nm zfs 583eda14cbcSMatt Macy.Cm redact 584eda14cbcSMatt Macy.Ar snapshot redaction_bookmark 58516038816SMartin Matuska.Ar redaction_snapshot Ns … 586eda14cbcSMatt Macy.Xc 587eda14cbcSMatt MacyGenerate a new redaction bookmark. 588eda14cbcSMatt MacyIn addition to the typical bookmark information, a redaction bookmark contains 589eda14cbcSMatt Macythe list of redacted blocks and the list of redaction snapshots specified. 590eda14cbcSMatt MacyThe redacted blocks are blocks in the snapshot which are not referenced by any 591eda14cbcSMatt Macyof the redaction snapshots. 592eda14cbcSMatt MacyThese blocks are found by iterating over the metadata in each redaction snapshot 593eda14cbcSMatt Macyto determine what has been changed since the target snapshot. 594eda14cbcSMatt MacyRedaction is designed to support redacted zfs sends; see the entry for 59516038816SMartin Matuska.Nm zfs Cm send 596eda14cbcSMatt Macyfor more information on the purpose of this operation. 597eda14cbcSMatt MacyIf a redact operation fails partway through (due to an error or a system 598eda14cbcSMatt Macyfailure), the redaction can be resumed by rerunning the same command. 599eda14cbcSMatt Macy.El 600eda14cbcSMatt Macy.Ss Redaction 601eda14cbcSMatt MacyZFS has support for a limited version of data subsetting, in the form of 60216038816SMartin Matuskaredaction. 60316038816SMartin MatuskaUsing the 60416038816SMartin Matuska.Nm zfs Cm redact 605eda14cbcSMatt Macycommand, a 606eda14cbcSMatt Macy.Sy redaction bookmark 60716038816SMartin Matuskacan be created that stores a list of blocks containing sensitive information. 60816038816SMartin MatuskaWhen provided to 60916038816SMartin Matuska.Nm zfs Cm send , 610eda14cbcSMatt Macythis causes a 611eda14cbcSMatt Macy.Sy redacted send 61216038816SMartin Matuskato occur. 61316038816SMartin MatuskaRedacted sends omit the blocks containing sensitive information, 61416038816SMartin Matuskareplacing them with REDACT records. 61516038816SMartin MatuskaWhen these send streams are received, a 616eda14cbcSMatt Macy.Sy redacted dataset 61716038816SMartin Matuskais created. 61816038816SMartin MatuskaA redacted dataset cannot be mounted by default, since it is incomplete. 61916038816SMartin MatuskaIt can be used to receive other send streams. 62016038816SMartin MatuskaIn this way datasets can be used for data backup and replication, 62116038816SMartin Matuskawith all the benefits that zfs send and receive have to offer, 62216038816SMartin Matuskawhile protecting sensitive information from being 623eda14cbcSMatt Macystored on less-trusted machines or services. 624eda14cbcSMatt Macy.Pp 62516038816SMartin MatuskaFor the purposes of redaction, there are two steps to the process. 62616038816SMartin MatuskaA redact step, and a send/receive step. 62716038816SMartin MatuskaFirst, a redaction bookmark is created. 62816038816SMartin MatuskaThis is done by providing the 62916038816SMartin Matuska.Nm zfs Cm redact 630eda14cbcSMatt Macycommand with a parent snapshot, a bookmark to be created, and a number of 63116038816SMartin Matuskaredaction snapshots. 63216038816SMartin MatuskaThese redaction snapshots must be descendants of the parent snapshot, 63316038816SMartin Matuskaand they should modify data that is considered sensitive in some way. 63416038816SMartin MatuskaAny blocks of data modified by all of the redaction snapshots will 635eda14cbcSMatt Macybe listed in the redaction bookmark, because it represents the truly sensitive 63616038816SMartin Matuskainformation. 63716038816SMartin MatuskaWhen it comes to the send step, the send process will not send 638eda14cbcSMatt Macythe blocks listed in the redaction bookmark, instead replacing them with 63916038816SMartin MatuskaREDACT records. 64016038816SMartin MatuskaWhen received on the target system, this will create a 641eda14cbcSMatt Macyredacted dataset, missing the data that corresponds to the blocks in the 64216038816SMartin Matuskaredaction bookmark on the sending system. 64316038816SMartin MatuskaThe incremental send streams from 644eda14cbcSMatt Macythe original parent to the redaction snapshots can then also be received on 645eda14cbcSMatt Macythe target system, and this will produce a complete snapshot that can be used 64616038816SMartin Matuskanormally. 64716038816SMartin MatuskaIncrementals from one snapshot on the parent filesystem and another 648eda14cbcSMatt Macycan also be done by sending from the redaction bookmark, rather than the 649eda14cbcSMatt Macysnapshots themselves. 650eda14cbcSMatt Macy.Pp 65116038816SMartin MatuskaIn order to make the purpose of the feature more clear, an example is provided. 65216038816SMartin MatuskaConsider a zfs filesystem containing four files. 65316038816SMartin MatuskaThese files represent information for an online shopping service. 654bb2d13b6SMartin MatuskaOne file contains a list of usernames and passwords, another contains purchase 655bb2d13b6SMartin Matuskahistories, 65616038816SMartin Matuskaa third contains click tracking data, and a fourth contains user preferences. 65716038816SMartin MatuskaThe owner of this data wants to make it available for their development teams to 65816038816SMartin Matuskatest against, and their market research teams to do analysis on. 65916038816SMartin MatuskaThe development teams need information about user preferences and the click 660eda14cbcSMatt Macytracking data, while the market research teams need information about purchase 66116038816SMartin Matuskahistories and user preferences. 66216038816SMartin MatuskaNeither needs access to the usernames and passwords. 66316038816SMartin MatuskaHowever, because all of this data is stored in one ZFS filesystem, 66416038816SMartin Matuskait must all be sent and received together. 66516038816SMartin MatuskaIn addition, the owner of the data 666eda14cbcSMatt Macywants to take advantage of features like compression, checksumming, and 667bb2d13b6SMartin Matuskasnapshots, so they do want to continue to use ZFS to store and transmit their 668bb2d13b6SMartin Matuskadata. 66916038816SMartin MatuskaRedaction can help them do so. 67016038816SMartin MatuskaFirst, they would make two clones of a snapshot of the data on the source. 67116038816SMartin MatuskaIn one clone, they create the setup they want their market research team to see; 67216038816SMartin Matuskathey delete the usernames and passwords file, 67316038816SMartin Matuskaand overwrite the click tracking data with dummy information. 67416038816SMartin MatuskaIn another, they create the setup they want the development teams 675eda14cbcSMatt Macyto see, by replacing the passwords with fake information and replacing the 67616038816SMartin Matuskapurchase histories with randomly generated ones. 67716038816SMartin MatuskaThey would then create a redaction bookmark on the parent snapshot, 67816038816SMartin Matuskausing snapshots on the two clones as redaction snapshots. 67916038816SMartin MatuskaThe parent can then be sent, redacted, to the target 68016038816SMartin Matuskaserver where the research and development teams have access. 681bb2d13b6SMartin MatuskaFinally, incremental sends from the parent snapshot to each of the clones can be 682bb2d13b6SMartin Matuskasent 683eda14cbcSMatt Macyto and received on the target server; these snapshots are identical to the 684eda14cbcSMatt Macyones on the source, and are ready to be used, while the parent snapshot on the 685eda14cbcSMatt Macytarget contains none of the username and password data present on the source, 686eda14cbcSMatt Macybecause it was removed by the redacted send operation. 68716038816SMartin Matuska. 688315ee00fSMartin Matuska.Sh SIGNALS 689315ee00fSMartin MatuskaSee 690315ee00fSMartin Matuska.Fl v . 691315ee00fSMartin Matuska. 692da5137abSMartin Matuska.Sh EXAMPLES 693da5137abSMartin Matuska.\" These are, respectively, examples 12, 13 from zfs.8 694da5137abSMartin Matuska.\" Make sure to update them bidirectionally 695da5137abSMartin Matuska.Ss Example 1 : No Remotely Replicating ZFS Data 696da5137abSMartin MatuskaThe following commands send a full stream and then an incremental stream to a 697da5137abSMartin Matuskaremote machine, restoring them into 698da5137abSMartin Matuska.Em poolB/received/fs@a 699da5137abSMartin Matuskaand 700da5137abSMartin Matuska.Em poolB/received/fs@b , 701da5137abSMartin Matuskarespectively. 702da5137abSMartin Matuska.Em poolB 703da5137abSMartin Matuskamust contain the file system 704da5137abSMartin Matuska.Em poolB/received , 705da5137abSMartin Matuskaand must not initially contain 706da5137abSMartin Matuska.Em poolB/received/fs . 707da5137abSMartin Matuska.Bd -literal -compact -offset Ds 708da5137abSMartin Matuska.No # Nm zfs Cm send Ar pool/fs@a | 709da5137abSMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs Ns @ Ns Ar a 710da5137abSMartin Matuska.No # Nm zfs Cm send Fl i Ar a pool/fs@b | 711da5137abSMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs 712da5137abSMartin Matuska.Ed 713da5137abSMartin Matuska. 714da5137abSMartin Matuska.Ss Example 2 : No Using the Nm zfs Cm receive Fl d No Option 715da5137abSMartin MatuskaThe following command sends a full stream of 716da5137abSMartin Matuska.Ar poolA/fsA/fsB@snap 717da5137abSMartin Matuskato a remote machine, receiving it into 718da5137abSMartin Matuska.Ar poolB/received/fsA/fsB@snap . 719da5137abSMartin MatuskaThe 720da5137abSMartin Matuska.Ar fsA/fsB@snap 721da5137abSMartin Matuskaportion of the received snapshot's name is determined from the name of the sent 722da5137abSMartin Matuskasnapshot. 723da5137abSMartin Matuska.Ar poolB 724da5137abSMartin Matuskamust contain the file system 725da5137abSMartin Matuska.Ar poolB/received . 726da5137abSMartin MatuskaIf 727da5137abSMartin Matuska.Ar poolB/received/fsA 728da5137abSMartin Matuskadoes not exist, it is created as an empty file system. 729da5137abSMartin Matuska.Bd -literal -compact -offset Ds 730da5137abSMartin Matuska.No # Nm zfs Cm send Ar poolA/fsA/fsB@snap | 731da5137abSMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Fl d Ar poolB/received 732da5137abSMartin Matuska.Ed 733da5137abSMartin Matuska. 734eda14cbcSMatt Macy.Sh SEE ALSO 735eda14cbcSMatt Macy.Xr zfs-bookmark 8 , 736eda14cbcSMatt Macy.Xr zfs-receive 8 , 737eda14cbcSMatt Macy.Xr zfs-redact 8 , 738eda14cbcSMatt Macy.Xr zfs-snapshot 8 739