LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

btrfs-send

Generate a stream of btrfs subvolume changes for backup and replication

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.

INSTALL

sudo apt install btrfs-progs
copy
sudo dnf install btrfs-progs
copy
sudo pacman -S btrfs-progs
copy
sudo apk add btrfs-progs
copy
brew install btrfs-progs
copy
nix profile install nixpkgs#btrfs-progs
copy

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

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid