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. 31eda14cbcSMatt Macy.\" 32*2a58b312SMartin Matuska.Dd March 12, 2023 33eda14cbcSMatt Macy.Dt ZFS-RECEIVE 8 34eda14cbcSMatt Macy.Os 3516038816SMartin Matuska. 36eda14cbcSMatt Macy.Sh NAME 377877fdebSMatt Macy.Nm zfs-receive 3816038816SMartin Matuska.Nd create snapshot from backup stream 39eda14cbcSMatt Macy.Sh SYNOPSIS 407877fdebSMatt Macy.Nm zfs 41eda14cbcSMatt Macy.Cm receive 42eda14cbcSMatt Macy.Op Fl FhMnsuv 43eda14cbcSMatt Macy.Op Fl o Sy origin Ns = Ns Ar snapshot 44eda14cbcSMatt Macy.Op Fl o Ar property Ns = Ns Ar value 45eda14cbcSMatt Macy.Op Fl x Ar property 46eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 477877fdebSMatt Macy.Nm zfs 48eda14cbcSMatt Macy.Cm receive 49eda14cbcSMatt Macy.Op Fl FhMnsuv 50eda14cbcSMatt Macy.Op Fl d Ns | Ns Fl e 51eda14cbcSMatt Macy.Op Fl o Sy origin Ns = Ns Ar snapshot 52eda14cbcSMatt Macy.Op Fl o Ar property Ns = Ns Ar value 53eda14cbcSMatt Macy.Op Fl x Ar property 54eda14cbcSMatt Macy.Ar filesystem 557877fdebSMatt Macy.Nm zfs 56eda14cbcSMatt Macy.Cm receive 57eda14cbcSMatt Macy.Fl A 58eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume 59*2a58b312SMartin Matuska.Nm zfs 60271171e0SMartin Matuska.Cm receive 61271171e0SMartin Matuska.Fl c 62271171e0SMartin Matuska.Op Fl vn 63271171e0SMartin Matuska.Ar filesystem Ns | Ns Ar snapshot 64271171e0SMartin Matuska. 65eda14cbcSMatt Macy.Sh DESCRIPTION 66eda14cbcSMatt Macy.Bl -tag -width "" 67eda14cbcSMatt Macy.It Xo 687877fdebSMatt Macy.Nm zfs 69eda14cbcSMatt Macy.Cm receive 70eda14cbcSMatt Macy.Op Fl FhMnsuv 71eda14cbcSMatt Macy.Op Fl o Sy origin Ns = Ns Ar snapshot 72eda14cbcSMatt Macy.Op Fl o Ar property Ns = Ns Ar value 73eda14cbcSMatt Macy.Op Fl x Ar property 74eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 75eda14cbcSMatt Macy.Xc 76eda14cbcSMatt Macy.It Xo 777877fdebSMatt Macy.Nm zfs 78eda14cbcSMatt Macy.Cm receive 79eda14cbcSMatt Macy.Op Fl FhMnsuv 80eda14cbcSMatt Macy.Op Fl d Ns | Ns Fl e 81eda14cbcSMatt Macy.Op Fl o Sy origin Ns = Ns Ar snapshot 82eda14cbcSMatt Macy.Op Fl o Ar property Ns = Ns Ar value 83eda14cbcSMatt Macy.Op Fl x Ar property 84eda14cbcSMatt Macy.Ar filesystem 85eda14cbcSMatt Macy.Xc 86eda14cbcSMatt MacyCreates a snapshot whose contents are as specified in the stream provided on 87eda14cbcSMatt Macystandard input. 88eda14cbcSMatt MacyIf a full stream is received, then a new file system is created as well. 89eda14cbcSMatt MacyStreams are created using the 90eda14cbcSMatt Macy.Nm zfs Cm send 91eda14cbcSMatt Macysubcommand, which by default creates a full stream. 92eda14cbcSMatt Macy.Nm zfs Cm recv 93eda14cbcSMatt Macycan be used as an alias for 94eda14cbcSMatt Macy.Nm zfs Cm receive . 95eda14cbcSMatt Macy.Pp 96eda14cbcSMatt MacyIf an incremental stream is received, then the destination file system must 97eda14cbcSMatt Macyalready exist, and its most recent snapshot must match the incremental stream's 98eda14cbcSMatt Macysource. 99eda14cbcSMatt MacyFor 100eda14cbcSMatt Macy.Sy zvols , 101eda14cbcSMatt Macythe destination device link is destroyed and recreated, which means the 102eda14cbcSMatt Macy.Sy zvol 103eda14cbcSMatt Macycannot be accessed during the 104eda14cbcSMatt Macy.Cm receive 105eda14cbcSMatt Macyoperation. 106eda14cbcSMatt Macy.Pp 107eda14cbcSMatt MacyWhen a snapshot replication package stream that is generated by using the 108eda14cbcSMatt Macy.Nm zfs Cm send Fl R 109eda14cbcSMatt Macycommand is received, any snapshots that do not exist on the sending location are 110eda14cbcSMatt Macydestroyed by using the 111eda14cbcSMatt Macy.Nm zfs Cm destroy Fl d 112eda14cbcSMatt Macycommand. 113eda14cbcSMatt Macy.Pp 114eda14cbcSMatt MacyThe ability to send and receive deduplicated send streams has been removed. 115eda14cbcSMatt MacyHowever, a deduplicated send stream created with older software can be converted 116eda14cbcSMatt Macyto a regular (non-deduplicated) stream by using the 117eda14cbcSMatt Macy.Nm zstream Cm redup 118eda14cbcSMatt Macycommand. 119eda14cbcSMatt Macy.Pp 120eda14cbcSMatt MacyIf 121eda14cbcSMatt Macy.Fl o Em property Ns = Ns Ar value 122eda14cbcSMatt Macyor 123eda14cbcSMatt Macy.Fl x Em property 124eda14cbcSMatt Macyis specified, it applies to the effective value of the property throughout 12516038816SMartin Matuskathe entire subtree of replicated datasets. 12616038816SMartin MatuskaEffective property values will be set 12716038816SMartin Matuska.Pq Fl o 12816038816SMartin Matuskaor inherited 12916038816SMartin Matuska.Pq Fl x 13016038816SMartin Matuskaon the topmost in the replicated subtree. 13116038816SMartin MatuskaIn descendant datasets, if the 132eda14cbcSMatt Macyproperty is set by the send stream, it will be overridden by forcing the 13316038816SMartin Matuskaproperty to be inherited from the top‐most file system. 13416038816SMartin MatuskaReceived properties are retained in spite of being overridden 13516038816SMartin Matuskaand may be restored with 136eda14cbcSMatt Macy.Nm zfs Cm inherit Fl S . 137eda14cbcSMatt MacySpecifying 138eda14cbcSMatt Macy.Fl o Sy origin Ns = Ns Em snapshot 139eda14cbcSMatt Macyis a special case because, even if 140eda14cbcSMatt Macy.Sy origin 141eda14cbcSMatt Macyis a read-only property and cannot be set, it's allowed to receive the send 142eda14cbcSMatt Macystream as a clone of the given snapshot. 143eda14cbcSMatt Macy.Pp 144eda14cbcSMatt MacyRaw encrypted send streams (created with 14516038816SMartin Matuska.Nm zfs Cm send Fl w ) 14616038816SMartin Matuskamay only be received as is, and cannot be re-encrypted, decrypted, or 14716038816SMartin Matuskarecompressed by the receive process. 14816038816SMartin MatuskaUnencrypted streams can be received as 149eda14cbcSMatt Macyencrypted datasets, either through inheritance or by specifying encryption 150eda14cbcSMatt Macyparameters with the 151eda14cbcSMatt Macy.Fl o 15216038816SMartin Matuskaoptions. 15316038816SMartin MatuskaNote that the 154eda14cbcSMatt Macy.Sy keylocation 155eda14cbcSMatt Macyproperty cannot be overridden to 156eda14cbcSMatt Macy.Sy prompt 15716038816SMartin Matuskaduring a receive. 15816038816SMartin MatuskaThis is because the receive process itself is already using 15916038816SMartin Matuskathe standard input for the send stream. 16016038816SMartin MatuskaInstead, the property can be overridden after the receive completes. 161eda14cbcSMatt Macy.Pp 162eda14cbcSMatt MacyThe added security provided by raw sends adds some restrictions to the send 16316038816SMartin Matuskaand receive process. 16416038816SMartin MatuskaZFS will not allow a mix of raw receives and non-raw receives. 16516038816SMartin MatuskaSpecifically, any raw incremental receives that are attempted after 16616038816SMartin Matuskaa non-raw receive will fail. 16716038816SMartin MatuskaNon-raw receives do not have this restriction and, 16816038816SMartin Matuskatherefore, are always possible. 16916038816SMartin MatuskaBecause of this, it is best practice to always 170eda14cbcSMatt Macyuse either raw sends for their security benefits or non-raw sends for their 171eda14cbcSMatt Macyflexibility when working with encrypted datasets, but not a combination. 172eda14cbcSMatt Macy.Pp 173eda14cbcSMatt MacyThe reason for this restriction stems from the inherent restrictions of the 17416038816SMartin MatuskaAEAD ciphers that ZFS uses to encrypt data. 17516038816SMartin MatuskaWhen using ZFS native encryption, 176eda14cbcSMatt Macyeach block of data is encrypted against a randomly generated number known as 177eda14cbcSMatt Macythe "initialization vector" (IV), which is stored in the filesystem metadata. 178eda14cbcSMatt MacyThis number is required by the encryption algorithms whenever the data is to 17916038816SMartin Matuskabe decrypted. 18016038816SMartin MatuskaTogether, all of the IVs provided for all of the blocks in a 18116038816SMartin Matuskagiven snapshot are collectively called an "IV set". 18216038816SMartin MatuskaWhen ZFS performs a raw send, the IV set is transferred from the source 18316038816SMartin Matuskato the destination in the send stream. 18416038816SMartin MatuskaWhen ZFS performs a non-raw send, the data is decrypted by the source 185eda14cbcSMatt Macysystem and re-encrypted by the destination system, creating a snapshot with 18616038816SMartin Matuskaeffectively the same data, but a different IV set. 18716038816SMartin MatuskaIn order for decryption to work after a raw send, ZFS must ensure that 18816038816SMartin Matuskathe IV set used on both the source and destination side match. 18916038816SMartin MatuskaWhen an incremental raw receive is performed on 190eda14cbcSMatt Macytop of an existing snapshot, ZFS will check to confirm that the "from" 191eda14cbcSMatt Macysnapshot on both the source and destination were using the same IV set, 192eda14cbcSMatt Macyensuring the new IV set is consistent. 193eda14cbcSMatt Macy.Pp 194eda14cbcSMatt MacyThe name of the snapshot 195eda14cbcSMatt Macy.Pq and file system, if a full stream is received 196eda14cbcSMatt Macythat this subcommand creates depends on the argument type and the use of the 197eda14cbcSMatt Macy.Fl d 198eda14cbcSMatt Macyor 199eda14cbcSMatt Macy.Fl e 200eda14cbcSMatt Macyoptions. 201eda14cbcSMatt Macy.Pp 202eda14cbcSMatt MacyIf the argument is a snapshot name, the specified 203eda14cbcSMatt Macy.Ar snapshot 204eda14cbcSMatt Macyis created. 205eda14cbcSMatt MacyIf the argument is a file system or volume name, a snapshot with the same name 206eda14cbcSMatt Macyas the sent snapshot is created within the specified 207eda14cbcSMatt Macy.Ar filesystem 208eda14cbcSMatt Macyor 209eda14cbcSMatt Macy.Ar volume . 210eda14cbcSMatt MacyIf neither of the 211eda14cbcSMatt Macy.Fl d 212eda14cbcSMatt Macyor 213eda14cbcSMatt Macy.Fl e 214eda14cbcSMatt Macyoptions are specified, the provided target snapshot name is used exactly as 215eda14cbcSMatt Macyprovided. 216eda14cbcSMatt Macy.Pp 217eda14cbcSMatt MacyThe 218eda14cbcSMatt Macy.Fl d 219eda14cbcSMatt Macyand 220eda14cbcSMatt Macy.Fl e 221eda14cbcSMatt Macyoptions cause the file system name of the target snapshot to be determined by 222eda14cbcSMatt Macyappending a portion of the sent snapshot's name to the specified target 223eda14cbcSMatt Macy.Ar filesystem . 224eda14cbcSMatt MacyIf the 225eda14cbcSMatt Macy.Fl d 226eda14cbcSMatt Macyoption is specified, all but the first element of the sent snapshot's file 227eda14cbcSMatt Macysystem path 228eda14cbcSMatt Macy.Pq usually the pool name 229eda14cbcSMatt Macyis used and any required intermediate file systems within the specified one are 230eda14cbcSMatt Macycreated. 231eda14cbcSMatt MacyIf the 232eda14cbcSMatt Macy.Fl e 233eda14cbcSMatt Macyoption is specified, then only the last element of the sent snapshot's file 234eda14cbcSMatt Macysystem name 235eda14cbcSMatt Macy.Pq i.e. the name of the source file system itself 236eda14cbcSMatt Macyis used as the target file system name. 237eda14cbcSMatt Macy.Bl -tag -width "-F" 238eda14cbcSMatt Macy.It Fl F 239eda14cbcSMatt MacyForce a rollback of the file system to the most recent snapshot before 240eda14cbcSMatt Macyperforming the receive operation. 241eda14cbcSMatt MacyIf receiving an incremental replication stream 242eda14cbcSMatt Macy.Po for example, one generated by 243eda14cbcSMatt Macy.Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I 244eda14cbcSMatt Macy.Pc , 245eda14cbcSMatt Macydestroy snapshots and file systems that do not exist on the sending side. 246eda14cbcSMatt Macy.It Fl d 247eda14cbcSMatt MacyDiscard the first element of the sent snapshot's file system name, using the 248eda14cbcSMatt Macyremaining elements to determine the name of the target file system for the new 249eda14cbcSMatt Macysnapshot as described in the paragraph above. 250eda14cbcSMatt Macy.It Fl e 251eda14cbcSMatt MacyDiscard all but the last element of the sent snapshot's file system name, using 252eda14cbcSMatt Macythat element to determine the name of the target file system for the new 253eda14cbcSMatt Macysnapshot as described in the paragraph above. 254eda14cbcSMatt Macy.It Fl h 25516038816SMartin MatuskaSkip the receive of holds. 25616038816SMartin MatuskaThere is no effect if holds are not sent. 257eda14cbcSMatt Macy.It Fl M 258eda14cbcSMatt MacyForce an unmount of the file system while receiving a snapshot. 259eda14cbcSMatt MacyThis option is not supported on Linux. 260eda14cbcSMatt Macy.It Fl n 261eda14cbcSMatt MacyDo not actually receive the stream. 262eda14cbcSMatt MacyThis can be useful in conjunction with the 263eda14cbcSMatt Macy.Fl v 264eda14cbcSMatt Macyoption to verify the name the receive operation would use. 265eda14cbcSMatt Macy.It Fl o Sy origin Ns = Ns Ar snapshot 266eda14cbcSMatt MacyForces the stream to be received as a clone of the given snapshot. 267eda14cbcSMatt MacyIf the stream is a full send stream, this will create the filesystem 268eda14cbcSMatt Macydescribed by the stream as a clone of the specified snapshot. 269eda14cbcSMatt MacyWhich snapshot was specified will not affect the success or failure of the 270eda14cbcSMatt Macyreceive, as long as the snapshot does exist. 271eda14cbcSMatt MacyIf the stream is an incremental send stream, all the normal verification will be 272eda14cbcSMatt Macyperformed. 273eda14cbcSMatt Macy.It Fl o Em property Ns = Ns Ar value 274eda14cbcSMatt MacySets the specified property as if the command 275eda14cbcSMatt Macy.Nm zfs Cm set Em property Ns = Ns Ar value 27616038816SMartin Matuskawas invoked immediately before the receive. 27716038816SMartin MatuskaWhen receiving a stream from 278eda14cbcSMatt Macy.Nm zfs Cm send Fl R , 279eda14cbcSMatt Macycauses the property to be inherited by all descendant datasets, as through 280eda14cbcSMatt Macy.Nm zfs Cm inherit Em property 281eda14cbcSMatt Macywas run on any descendant datasets that have this property set on the 282eda14cbcSMatt Macysending system. 283eda14cbcSMatt Macy.Pp 2849db44a8eSMartin MatuskaIf the send stream was sent with 2859db44a8eSMartin Matuska.Fl c 2869db44a8eSMartin Matuskathen overriding the 2879db44a8eSMartin Matuska.Sy compression 288681ce946SMartin Matuskaproperty will have no effect on received data but the 2899db44a8eSMartin Matuska.Sy compression 29016038816SMartin Matuskaproperty will be set. 29116038816SMartin MatuskaTo have the data recompressed on receive remove the 2929db44a8eSMartin Matuska.Fl c 2939db44a8eSMartin Matuskaflag from the send stream. 2949db44a8eSMartin Matuska.Pp 29516038816SMartin MatuskaAny editable property can be set at receive time. 29616038816SMartin MatuskaSet-once properties bound 297eda14cbcSMatt Macyto the received data, such as 298eda14cbcSMatt Macy.Sy normalization 299eda14cbcSMatt Macyand 300eda14cbcSMatt Macy.Sy casesensitivity , 301eda14cbcSMatt Macycannot be set at receive time even when the datasets are newly created by 302eda14cbcSMatt Macy.Nm zfs Cm receive . 303eda14cbcSMatt MacyAdditionally both settable properties 304eda14cbcSMatt Macy.Sy version 305eda14cbcSMatt Macyand 306eda14cbcSMatt Macy.Sy volsize 307eda14cbcSMatt Macycannot be set at receive time. 308eda14cbcSMatt Macy.Pp 309eda14cbcSMatt MacyThe 310eda14cbcSMatt Macy.Fl o 31116038816SMartin Matuskaoption may be specified multiple times, for different properties. 31216038816SMartin MatuskaAn error results if the same property is specified in multiple 313eda14cbcSMatt Macy.Fl o 314eda14cbcSMatt Macyor 315eda14cbcSMatt Macy.Fl x 316eda14cbcSMatt Macyoptions. 317eda14cbcSMatt Macy.Pp 318eda14cbcSMatt MacyThe 319eda14cbcSMatt Macy.Fl o 32016038816SMartin Matuskaoption may also be used to override encryption properties upon initial receive. 32116038816SMartin MatuskaThis allows unencrypted streams to be received as encrypted datasets. 322eda14cbcSMatt MacyTo cause the received dataset (or root dataset of a recursive stream) to be 323eda14cbcSMatt Macyreceived as an encryption root, specify encryption properties in the same 324eda14cbcSMatt Macymanner as is required for 32516038816SMartin Matuska.Nm zfs Cm create . 326eda14cbcSMatt MacyFor instance: 327c03c5b1cSMartin Matuska.Dl # Nm zfs Cm send Pa tank/test@snap1 | Nm zfs Cm recv Fl o Sy encryption Ns = Ns Sy on Fl o Sy keyformat Ns = Ns Sy passphrase Fl o Sy keylocation Ns = Ns Pa file:///path/to/keyfile 328eda14cbcSMatt Macy.Pp 329eda14cbcSMatt MacyNote that 33016038816SMartin Matuska.Fl o Sy keylocation Ns = Ns Sy prompt 33116038816SMartin Matuskamay not be specified here, since the standard input 33216038816SMartin Matuskais already being utilized for the send stream. 33316038816SMartin MatuskaOnce the receive has completed, you can use 33416038816SMartin Matuska.Nm zfs Cm set 33516038816SMartin Matuskato change this setting after the fact. 33616038816SMartin MatuskaSimilarly, you can receive a dataset as an encrypted child by specifying 337c03c5b1cSMartin Matuska.Fl x Sy encryption 33816038816SMartin Matuskato force the property to be inherited. 33916038816SMartin MatuskaOverriding encryption properties (except for 34016038816SMartin Matuska.Sy keylocation ) 341eda14cbcSMatt Macyis not possible with raw send streams. 342eda14cbcSMatt Macy.It Fl s 343eda14cbcSMatt MacyIf the receive is interrupted, save the partially received state, rather 344eda14cbcSMatt Macythan deleting it. 345eda14cbcSMatt MacyInterruption may be due to premature termination of the stream 346eda14cbcSMatt Macy.Po e.g. due to network failure or failure of the remote system 347eda14cbcSMatt Macyif the stream is being read over a network connection 348eda14cbcSMatt Macy.Pc , 349eda14cbcSMatt Macya checksum error in the stream, termination of the 350eda14cbcSMatt Macy.Nm zfs Cm receive 351eda14cbcSMatt Macyprocess, or unclean shutdown of the system. 352eda14cbcSMatt Macy.Pp 353eda14cbcSMatt MacyThe receive can be resumed with a stream generated by 354eda14cbcSMatt Macy.Nm zfs Cm send Fl t Ar token , 355eda14cbcSMatt Macywhere the 356eda14cbcSMatt Macy.Ar token 357eda14cbcSMatt Macyis the value of the 358eda14cbcSMatt Macy.Sy receive_resume_token 359eda14cbcSMatt Macyproperty of the filesystem or volume which is received into. 360eda14cbcSMatt Macy.Pp 361eda14cbcSMatt MacyTo use this flag, the storage pool must have the 362eda14cbcSMatt Macy.Sy extensible_dataset 363eda14cbcSMatt Macyfeature enabled. 364eda14cbcSMatt MacySee 3653ff01b23SMartin Matuska.Xr zpool-features 7 366eda14cbcSMatt Macyfor details on ZFS feature flags. 367eda14cbcSMatt Macy.It Fl u 368eda14cbcSMatt MacyFile system that is associated with the received stream is not mounted. 369eda14cbcSMatt Macy.It Fl v 370eda14cbcSMatt MacyPrint verbose information about the stream and the time required to perform the 371eda14cbcSMatt Macyreceive operation. 372eda14cbcSMatt Macy.It Fl x Em property 373eda14cbcSMatt MacyEnsures that the effective value of the specified property after the 374eda14cbcSMatt Macyreceive is unaffected by the value of that property in the send stream (if any), 375eda14cbcSMatt Macyas if the property had been excluded from the send stream. 376eda14cbcSMatt Macy.Pp 377eda14cbcSMatt MacyIf the specified property is not present in the send stream, this option does 378eda14cbcSMatt Macynothing. 379eda14cbcSMatt Macy.Pp 380eda14cbcSMatt MacyIf a received property needs to be overridden, the effective value will be 381eda14cbcSMatt Macyset or inherited, depending on whether the property is inheritable or not. 382eda14cbcSMatt Macy.Pp 383eda14cbcSMatt MacyIn the case of an incremental update, 384eda14cbcSMatt Macy.Fl x 385eda14cbcSMatt Macyleaves any existing local setting or explicit inheritance unchanged. 386eda14cbcSMatt Macy.Pp 387eda14cbcSMatt MacyAll 388eda14cbcSMatt Macy.Fl o 389eda14cbcSMatt Macyrestrictions (e.g. set-once) apply equally to 390eda14cbcSMatt Macy.Fl x . 391eda14cbcSMatt Macy.El 392eda14cbcSMatt Macy.It Xo 3937877fdebSMatt Macy.Nm zfs 394eda14cbcSMatt Macy.Cm receive 395eda14cbcSMatt Macy.Fl A 396eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume 397eda14cbcSMatt Macy.Xc 398eda14cbcSMatt MacyAbort an interrupted 399eda14cbcSMatt Macy.Nm zfs Cm receive Fl s , 400eda14cbcSMatt Macydeleting its saved partially received state. 401271171e0SMartin Matuska.It Xo 402271171e0SMartin Matuska.Nm zfs 403271171e0SMartin Matuska.Cm receive 404271171e0SMartin Matuska.Fl c 405271171e0SMartin Matuska.Op Fl vn 406271171e0SMartin Matuska.Ar filesystem Ns | Ns Ar snapshot 407271171e0SMartin Matuska.Xc 408*2a58b312SMartin MatuskaAttempt to repair data corruption in the specified dataset, 409271171e0SMartin Matuskaby using the provided stream as the source of healthy data. 410271171e0SMartin MatuskaThis method of healing can only heal data blocks present in the stream. 411271171e0SMartin MatuskaMetadata can not be healed by corrective receive. 412*2a58b312SMartin MatuskaRunning a scrub is recommended post-healing to ensure all data corruption was 413*2a58b312SMartin Matuskarepaired. 414271171e0SMartin Matuska.Pp 415*2a58b312SMartin MatuskaIt's important to consider why corruption has happened in the first place. 416*2a58b312SMartin MatuskaIf you have slowly failing hardware - periodically repairing the data 417271171e0SMartin Matuskais not going to save you from data loss later on when the hardware fails 418271171e0SMartin Matuskacompletely. 419eda14cbcSMatt Macy.El 42016038816SMartin Matuska. 421da5137abSMartin Matuska.Sh EXAMPLES 422da5137abSMartin Matuska.\" These are, respectively, examples 12, 13 from zfs.8 423da5137abSMartin Matuska.\" Make sure to update them bidirectionally 424da5137abSMartin Matuska.Ss Example 1 : No Remotely Replicating ZFS Data 425da5137abSMartin MatuskaThe following commands send a full stream and then an incremental stream to a 426da5137abSMartin Matuskaremote machine, restoring them into 427da5137abSMartin Matuska.Em poolB/received/fs@a 428da5137abSMartin Matuskaand 429da5137abSMartin Matuska.Em poolB/received/fs@b , 430da5137abSMartin Matuskarespectively. 431da5137abSMartin Matuska.Em poolB 432da5137abSMartin Matuskamust contain the file system 433da5137abSMartin Matuska.Em poolB/received , 434da5137abSMartin Matuskaand must not initially contain 435da5137abSMartin Matuska.Em poolB/received/fs . 436da5137abSMartin Matuska.Bd -literal -compact -offset Ds 437da5137abSMartin Matuska.No # Nm zfs Cm send Ar pool/fs@a | 438da5137abSMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs Ns @ Ns Ar a 439da5137abSMartin Matuska.No # Nm zfs Cm send Fl i Ar a pool/fs@b | 440da5137abSMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs 441da5137abSMartin Matuska.Ed 442da5137abSMartin Matuska. 443da5137abSMartin Matuska.Ss Example 2 : No Using the Nm zfs Cm receive Fl d No Option 444da5137abSMartin MatuskaThe following command sends a full stream of 445da5137abSMartin Matuska.Ar poolA/fsA/fsB@snap 446da5137abSMartin Matuskato a remote machine, receiving it into 447da5137abSMartin Matuska.Ar poolB/received/fsA/fsB@snap . 448da5137abSMartin MatuskaThe 449da5137abSMartin Matuska.Ar fsA/fsB@snap 450da5137abSMartin Matuskaportion of the received snapshot's name is determined from the name of the sent 451da5137abSMartin Matuskasnapshot. 452da5137abSMartin Matuska.Ar poolB 453da5137abSMartin Matuskamust contain the file system 454da5137abSMartin Matuska.Ar poolB/received . 455da5137abSMartin MatuskaIf 456da5137abSMartin Matuska.Ar poolB/received/fsA 457da5137abSMartin Matuskadoes not exist, it is created as an empty file system. 458da5137abSMartin Matuska.Bd -literal -compact -offset Ds 459da5137abSMartin Matuska.No # Nm zfs Cm send Ar poolA/fsA/fsB@snap | 460da5137abSMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Fl d Ar poolB/received 461da5137abSMartin Matuska.Ed 462da5137abSMartin Matuska. 463eda14cbcSMatt Macy.Sh SEE ALSO 46416038816SMartin Matuska.Xr zfs-send 8 , 465eda14cbcSMatt Macy.Xr zstream 8 466