LinuxCommandLibrary

btrfs-send

TLDR

Send a snapshot to stdout

$ btrfs send [/path/to/snapshot]
copy
Send to a file
$ btrfs send [/path/to/snapshot] -f [backup.send]
copy
Send incremental (only differences from parent)
$ btrfs send -p [/path/to/parent] [/path/to/snapshot]
copy
Send with multiple clone sources
$ btrfs send -c [/path/to/clone1] -c [/path/to/clone2] [/path/to/snapshot]
copy
Send and receive in one pipeline
$ btrfs send [/path/to/snapshot] | btrfs receive [/path/to/destination]
copy
Send incremental over SSH
$ btrfs send -p [/snapshots/old] [/snapshots/new] | ssh [user@host] btrfs receive [/backup]
copy
Quiet mode (no progress)
$ btrfs send -q [/path/to/snapshot]
copy

SYNOPSIS

btrfs send [-v] [-p parent] [-c clone-src] [-f outfile] subvolume

DESCRIPTION

btrfs send generates a stream of instructions representing a btrfs subvolume or snapshot. This stream can be received by btrfs receive to recreate the subvolume on another filesystem, enabling backup and replication workflows.
The send operation works on read-only snapshots and produces a binary stream containing file data, metadata, and structural information. When a parent snapshot is specified, only the differences (incremental send) are transmitted, dramatically reducing transfer size for regular backups.
The stream format is forward-compatible and can be piped directly, saved to a file, or transferred over network connections like SSH.

PARAMETERS

-f file

Write stream to file instead of stdout.
-p parent
Parent subvolume for incremental send.
-c clone-src
Clone source (additional reference for deduplication).
-v
Verbose mode.
-q
Quiet mode (no progress).
--no-data
Send without file data (metadata only).
-e
End stream after subvolume data.
--proto N
Use send stream protocol version N.

CAVEATS

Source subvolume must be read-only. Parent snapshot must exist on receive side for incremental restores. Stream is not human-readable. Interrupting send/receive may leave incomplete subvolumes. File permissions and ownership require appropriate privileges to restore. Compressed send streams require protocol version 2+.

HISTORY

btrfs send/receive was introduced in Linux kernel 3.6 (released September 2012) as part of btrfs development. It was designed to enable efficient snapshot-based backup and replication, similar to ZFS send/receive. The feature has been enhanced over time with compressed transfers (protocol v2) and improved performance for large filesystems.

SEE ALSO

Copied to clipboard