zfs-send(8)
Send ZFS dataset snapshots or incremental changes to stdout for backup, replication, or transfer to another system.
Synopsis
zfs send [-DRceLnPpvV] [-e epoch] [-t token] [--saved] SNAPSHOT [SNAPSHOT|BOOKMARK]Description
The zfs send command serializes a ZFS snapshot or incremental dataset changes into a stream that can be written to a file, piped to zfs receive on another system, or stored for backup purposes. It enables efficient replication, disaster recovery, and data migration.
By default, zfs send SNAPSHOT outputs the full snapshot contents. Use zfs send -i BASE SNAPSHOT to send only the incremental changes between two snapshots, which is much faster and smaller for frequent backups.
The stream can be encrypted, compressed, or piped directly to zfs receive for real-time replication across network connections or to local pools.
Common options
| Flag | What it does |
|---|---|
-i snapshot | send incremental changes from snapshot to next snapshot; much smaller than full send |
-R | send all snapshots and child datasets recursively |
-e | estimate send size without actually sending; useful for capacity planning |
-L | send all snapshots since snapshot with label; use with -R for resumable streams |
-c | use LZ4 compression on the stream; reduces bandwidth usage |
-P | show progress; print percentage and bytes processed during send |
-v | verbose output; print each snapshot name as it is sent |
-n | dry-run; perform all checks but do not actually send data |
--saved | send data saved by zfs save since the last successful send |
-D | use dedup statistics for estimating stream size |
Examples
Full backup of a snapshot to a file; creates a complete copy of dataset state at snapshot time
zfs send pool/dataset@snapshot > backup.zfsIncremental replication; sends only changes between snap1 and snap2 to another pool in real-time
zfs send -i pool/dataset@snap1 pool/dataset@snap2 | zfs receive backup/datasetCompressed recursive send over SSH; backs up entire dataset hierarchy to remote server with compression
zfs send -R -c [email protected] | ssh backup-server zfs receive -F archive/datasetsEstimate size; shows how many bytes the incremental stream would require without sending
zfs send -e pool/dataset@snap1 pool/dataset@snap2Show progress while sending; combine with <code>pv</code> for detailed bandwidth monitoring
zfs send -P -i pool/[email protected] pool/[email protected] | pv > weekly-backup.zfsFull recursive backup with gzip compression; useful for archival to external storage
zfs send -R pool@full-backup | gzip > full-backup-$(date +%Y%m%d).gzDry-run; verify incremental send works before actually executing it
zfs send -n -i pool/db@snap1 pool/db@snap2Resumable send; can be restarted if interrupted, useful for large datasets over unreliable networks
zfs send -L label pool/dataset | zfs receive -F replica/dataset