zfs-receive(8)
Receives a ZFS dataset stream and reconstructs the dataset on the receiving system.
Synopsis
zfs receive [-vnFeu] [-d|-e] [-o prop=value]... [dataset|snapshot]Description
The zfs receive command reads a stream (typically created by zfs send) from standard input and reconstructs ZFS datasets and snapshots. It is commonly used for backup, replication, and migration of ZFS storage pools.
The receiving system must have the parent dataset already created. Receive operations are transactional and atomic—partial streams will roll back automatically if interrupted. The command preserves dataset properties, snapshots, and incremental changes when using incremental streams.
Common options
| Flag | What it does |
|---|---|
-v | Verbose output; prints dataset name and size of each received snapshot |
-n | Perform a dry-run; validate the stream without writing data |
-F | Force rollback of the target dataset to the snapshot from the send stream before receiving |
-e | Discard everything in the stream before the first snapshot; use for incremental streams to new dataset |
-d | Discard the first element of the dataset path; useful for changing the dataset hierarchy |
-u | Receive and mount the dataset, even if it was previously not mounted |
-o prop=value | Override or set dataset properties during receive (e.g., -o mountpoint=/mnt/data) |
-x prop | Exclude a dataset property from being received; useful for not overwriting local settings |
Examples
Send a full snapshot from local pool to a remote system over SSH
zfs send pool/dataset@snapshot | ssh remote zfs receive pool/datasetReceive an incremental stream (changes between snap1 and snap2) into a backup pool
zfs send -i pool/dataset@snap1 pool/dataset@snap2 | zfs receive backup/datasetPerform a dry-run to validate a backup stream before actually receiving it
zfs receive -n pool/dataset < backup.zfsForce rollback the target dataset and receive the snapshot stream, overwriting local changes
zfs receive -F pool/dataset < latest-snapshot.zfsReceive a recursive snapshot stream, stripping the first element to place under backup pool
zfs send -R pool/dataset@snap | zfs receive -d backupReceive a full backup with verbose output showing progress
zfs receive -v pool/restored < full-backup.zfsSend incremental stream with progress monitoring (pv) and auto-mount on receive
zfs send -i pool/data@daily pool/data@daily-2 | pv | ssh remote zfs receive -u backup/data