Main index | Section 8 | Options |
zfs
receive
[ | |
zfs
receive
[ If an incremental stream is received, then the destination file system must already exist, and its most recent snapshot must match the incremental stream's source. For zvols, the destination device link is destroyed and recreated, which means the zvol cannot be accessed during the receive operation. When a snapshot replication package stream that is generated by using the zfs command is received, any snapshots that do not exist on the sending location are destroyed by using the zfs command. The ability to send and receive deduplicated send streams has been removed. However, a deduplicated send stream created with older software can be converted to a regular (non-deduplicated) stream by using the zstream command.
If
Raw encrypted send streams (created with
zfs)
may only be received as is, and cannot be re-encrypted, decrypted, or
recompressed by the receive process.
Unencrypted streams can be received as
encrypted datasets, either through inheritance or by specifying encryption
parameters with the
The added security provided by raw sends adds some restrictions to the send and receive process. ZFS will not allow a mix of raw receives and non-raw receives. Specifically, any raw incremental receives that are attempted after a non-raw receive will fail. Non-raw receives do not have this restriction and, therefore, are always possible. Because of this, it is best practice to always use either raw sends for their security benefits or non-raw sends for their flexibility when working with encrypted datasets, but not a combination. The reason for this restriction stems from the inherent restrictions of the AEAD ciphers that ZFS uses to encrypt data. When using ZFS native encryption, each block of data is encrypted against a randomly generated number known as the "initialization vector" (IV), which is stored in the filesystem metadata. This number is required by the encryption algorithms whenever the data is to be decrypted. Together, all of the IVs provided for all of the blocks in a given snapshot are collectively called an "IV set". When ZFS performs a raw send, the IV set is transferred from the source to the destination in the send stream. When ZFS performs a non-raw send, the data is decrypted by the source system and re-encrypted by the destination system, creating a snapshot with effectively the same data, but a different IV set. In order for decryption to work after a raw send, ZFS must ensure that the IV set used on both the source and destination side match. When an incremental raw receive is performed on top of an existing snapshot, ZFS will check to confirm that the "from" snapshot on both the source and destination were using the same IV set, ensuring the new IV set is consistent.
The name of the snapshot
(and file system, if a full stream is received)
that this subcommand creates depends on the argument type and the use of the
If the argument is a snapshot name, the specified
snapshot
is created.
If the argument is a file system or volume name, a snapshot with the same name
as the sent snapshot is created within the specified
filesystem
or
volume.
If neither of the
The
| |
| |
Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by zfs ), destroy snapshots and file systems that do not exist on the sending side. | |
| |
Discard the first element of the sent snapshot's file system name, using the remaining elements to determine the name of the target file system for the new snapshot as described in the paragraph above. | |
| |
Discard all but the last element of the sent snapshot's file system name, using that element to determine the name of the target file system for the new snapshot as described in the paragraph above. | |
| |
Skip the receive of holds. There is no effect if holds are not sent. | |
| |
Force an unmount of the file system while receiving a snapshot. This option is not supported on Linux. | |
| |
Do not actually receive the stream.
This can be useful in conjunction with the
| |
| |
Forces the stream to be received as a clone of the given snapshot. If the stream is a full send stream, this will create the filesystem described by the stream as a clone of the specified snapshot. Which snapshot was specified will not affect the success or failure of the receive, as long as the snapshot does exist. If the stream is an incremental send stream, all the normal verification will be performed. | |
| |
Sets the specified property as if the command
zfs
was invoked immediately before the receive.
When receiving a stream from
zfs,
causes the property to be inherited by all descendant datasets, as through
zfs
was run on any descendant datasets that have this property set on the
sending system.
If the send stream was sent with
Any editable property can be set at receive time. Set-once properties bound to the received data, such as normalization and casesensitivity, cannot be set at receive time even when the datasets are newly created by zfs. Additionally both settable properties version and volsize cannot be set at receive time.
The
The
# zfs
Note that
| |
| |
If the receive is interrupted, save the partially received state, rather
than deleting it.
Interruption may be due to premature termination of the stream
(e.g. due to network failure or failure of the remote system
if the stream is being read over a network connection
),
a checksum error in the stream, termination of the
zfs
process, or unclean shutdown of the system.
The receive can be resumed with a stream generated by zfs, where the token is the value of the receive_resume_token property of the filesystem or volume which is received into. To use this flag, the storage pool must have the extensible_dataset feature enabled. See zpool-features(7) for details on ZFS feature flags. | |
| |
File system that is associated with the received stream is not mounted. | |
| |
Print verbose information about the stream and the time required to perform the receive operation. | |
| |
Ensures that the effective value of the specified property after the
receive is unaffected by the value of that property in the send stream (if any),
as if the property had been excluded from the send stream.
If the specified property is not present in the send stream, this option does nothing. If a received property needs to be overridden, the effective value will be set or inherited, depending on whether the property is inheritable or not.
In the case of an incremental update,
All
| |
zfs
receive
| |
ZFS-RECEIVE (8) | February 16, 2020 |
Main index | Section 8 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Today, the Unix equivalent of a power drill would have 20 dials and switches, come with a nonstandard plug, require the user to hand-wind the motor coil, and not accept 3/8" or 7/8" drill bits (though this would be documented in the BUGS section of its instruction manual). | ” |
— The Unix Haters' handbook |