Skip to content

Send and Receive — Backups That Travel

This is the chapter that answers chapter 1's rule. The outcome: a snapshot copied to another disk or another machine, verified there, so that the death of the first disk is an inconvenience and not a bereavement. Send and receive need a mounted filesystem at both ends; the lab could not mount (transcript t00), so the procedures are documented-only and labelled, while the ideas — and the arithmetic — are exact.

The idea

btrfs send reads a read-only snapshot and writes a stream: a self-describing sequence of the files, directories and changes that make up that snapshot. btrfs receive plays a stream into a btrfs filesystem at the other end and rebuilds the snapshot there. The stream can cross the room or the world — written to a file, piped over SSH, carried on a disk.

sudo btrfs send /mnt/snapshots/root-2026-01-15 > /backup-media/root-2026-01-15.stream
cd /mnt/backup-drive
sudo btrfs receive .

The received subvolume is the snapshot itself, read-only, on the other disk. That is the difference between a backup and a photograph of one.

The second time is faster

A full stream of a terabyte system is a terabyte. The daily stream need not be: if both ends hold a common earlier snapshot, send can be given that snapshot as a parent, and the stream carries only what changed since:

sudo btrfs send -p /mnt/snapshots/root-2026-01-14 /mnt/snapshots/root-2026-01-15 | ssh vault 'btrfs receive /vault/snapshots'

Minutes of changes, not hours of data. The discipline this demands is bookkeeping: the parent must exist, unchanged and read-only, at both ends until the incremental lands. Delete a parent early and the next send quietly becomes a full one — or fails asking for its parent by name, which is the kinder outcome.

A working routine

  1. Snapshot the system, read-only, named by date (chapter 6).
  2. Send it — full the first time, incremental after — to a disk that is not the system disk. A second machine if you have one; an external disk you unplug afterwards if you don't.
  3. Verify the far end: list the received subvolume, restore a file from it, open it. A backup you have not read back is a hope, not a backup.
  4. Keep generations: today's, last week's, last month's, at the far end too, so a corruption discovered late can be rolled back past.
  5. Delete old snapshots at both ends together, parents last.

Tools like btrbk and snapper wrap exactly this routine in a config file and a timer; the routine is the same one either way, and running it by hand first teaches you what the wrapper will later hide. What send and receive will not do: encrypt (pipe through SSH or an encrypted file if the stream crosses a network), compress (pipe through zstd if the wire is slow), or cross to a non-btrfs destination — the receiving end must be btrfs, because what arrives is a snapshot, not a pile of files.