From 9ea019641e6cf0bb66378ab38ee71f5d00354d4c Mon Sep 17 00:00:00 2001 From: PaoloJr <57420955+PaoloJr@users.noreply.github.com> Date: Tue, 6 Oct 2026 12:42:28 -0400 Subject: [PATCH] btrfs-{send, receive}: add page (#24602) * added btrfs-send-receive page * btrfs-receive references btrfs-send * remove excess lines * simpler btrfs-send * Update pages/linux/btrfs-send.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --------- Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/linux/btrfs-receive.md | 7 +++++++ pages/linux/btrfs-send.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 pages/linux/btrfs-receive.md create mode 100644 pages/linux/btrfs-send.md diff --git a/pages/linux/btrfs-receive.md b/pages/linux/btrfs-receive.md new file mode 100644 index 0000000000..78081adef9 --- /dev/null +++ b/pages/linux/btrfs-receive.md @@ -0,0 +1,7 @@ +# btrfs receive + +> The examples for this command have been moved together with `btrfs send`. + +- View documentation for `btrfs receive`: + +`tldr btrfs send` diff --git a/pages/linux/btrfs-send.md b/pages/linux/btrfs-send.md new file mode 100644 index 0000000000..956cd10ad3 --- /dev/null +++ b/pages/linux/btrfs-send.md @@ -0,0 +1,34 @@ +# btrfs send + +> Transfer data (subvolume/snapshot) from one filesystem to another in a streamable format. +> Note: `send` requires the snapshot be read-only. +> See also: `btrfs-subvolume`, `btrfs-property`. +> More information: . + +- Send a subvolume snapshot to a file instead of `stdout`: + +`sudo btrfs send -f {{path/to/file.btrfs}} {{path/to/source_snapshot}}` + +- Restore a subvolume snapshot from a file instead of `stdin`: + +`sudo btrfs receive -f {{path/to/file.btrfs}} {{path/to/destination_directory}}` + +- Send a subvolume snapshot stream and pipe it to a receiving destination: + +`sudo btrfs send {{path/to/source_snapshot}} | sudo btrfs receive {{path/to/destination_directory}}` + +- Send an incremental update (differences between parent and new snapshot) to a file: + +`sudo btrfs send -p {{path/to/parent_snapshot}} -f {{path/to/incremental.btrfs}} {{path/to/new_snapshot}}` + +- Send an incremental update stream and pipe it to a receiving destination: + +`sudo btrfs send -p {{path/to/parent_snapshot}} {{path/to/new_snapshot}} | sudo btrfs receive {{path/to/destination_directory}}` + +- Send a subvolume snapshot over SSH (the receiving `sudo` must be configured for passwordless execution): + +`sudo btrfs send {{path/to/source_snapshot}} | ssh {{user}}@{{host}} "sudo btrfs receive {{path/to/destination_directory}}"` + +- Dump stream metadata from a file without modifying the filesystem: + +`sudo btrfs receive --dump -f {{path/to/file.btrfs}}`