BTRFS-RECEIVE(8)
π BTRFS-RECEIVE(8) π
okay bestie, pull up a chair, because we're talking about btrfs-receive β the receiving half of the btrfs send/receive duo, straight out of the BTRFS manual section. she's the one who catches the stream and makes a whole subvolume out of it. main character energy, no cap. π¦
β¨ NAME β¨
btrfs-receive β receive subvolumes from send stream πΈ
π SYNOPSIS π
btrfs receive [options] <path>
or
btrfs receive --dump [options]
π DESCRIPTION π
So basically, btrfs receive takes a stream of changes and replicates one or more subvolumes that were, at some point, generated by btrfs send. The received subvolumes get stored into path β unless you handed it the --dump option, in which case we're just vibing in read-only mode, iykyk.
If --dump is specified, btrfs receive will only do the validation of the stream and print the stream metadata, one operation per line. That's it. No filesystem changes, just receipts. π
Now, the ways this can go wrong β because bestie, she will fail in these cases:
- receiving subvolume already exists π
- previously received subvolume has been changed after it was received π
- default subvolume has changed, or you didn't mount the filesystem at the toplevel subvolume π
A subvolume is made read-only after the receiving process finishes successfully β see BUGS below for the tea on that. π₯
β¨ Options β¨
-f <FILE>β read the stream from FILE instead ofstdin, so you're not stuck piping things in like a peasant π«Ά-C,--chrootβ confine the process to path usingchroot(1)<https://man7.org/linux/man-pages/man1/chroot.1.html>. lil jail cell, adorable π-eβ terminate after receiving an end cmd marker in the stream.
Without this option, the receiver side terminates only in case of an error on end of file. so like... she just keeps going until something explodes π
-E,--max-errors <NERR>β terminate as soon as NERR errors occur while stream processing commands from the stream.
Default value is 1. A value of 0 means no limit. (no limit?? brave. iconic but brave. π)
-m <ROOTMOUNT>β the root mount point of the destination filesystem.
By default the mount point is searched in /proc/self/mounts. If /proc is not accessible, e.g. in a chroot environment, use this option to tell us where this filesystem is mounted. β¨
--force-decompressβ if the stream contains compressed data (see--compressed-datainbtrfs-send(8)<>), always decompress it instead of writing it with encoded I/O π§--dumpβ dump the stream metadata, one line per operation.
Does not require the path parameter. The filesystem remains unchanged. Each stream command is on one line in the form of key=value and separated by one or more spaces. Values that contain special characters (like paths or extended attributes) are encoded in a C-like way, e.g. '\n' or an octal escape sequence like '\NNN' where N is the char value. Same encoding as is used in /proc files. nerd moment but honestly? slay. π
-q,--quietβ (deprecated) alias for global-qoption β οΈ-vβ (deprecated) alias for global-voption β οΈ
π Global options π
-v,--verboseβ increase verbosity about performed actions, print details about each operation. she's telling you everything π«Ά-q,--quietβ suppress all messages except errors. minimalism era π
π₯ BUGS π₯
btrfs receive sets the subvolume read-only after it completes successfully. However, while the receive is in progress, users who have write access to files or directories in the receiving path can add, remove, or modify files β in which case the resulting read-only subvolume will not be an exact copy of the sent subvolume. π bestie. the vibes are off.
If the intention is to create an exact copy, the receiving path should be protected from access by users until the receive operation has completed and the subvolume is set to read-only. lock it down, queen. π
Additionally, receive does not currently do a very good job of validating that an incremental send stream actually makes sense, and it is thus possible for a specially crafted send stream to create a subvolume with reflinks to arbitrary files in the same filesystem. πππ
Because of this, users are advised to not use btrfs receive on send streams from untrusted sources, and to protect trusted streams when sending them across untrusted networks.
like, genuinely. this is the real warning. do not skip it. π¨
π EXIT STATUS π
btrfs receive returns a zero exit status if it succeeds. Non zero is returned in case of failure. that's the vibe check: 0 = she ate, anything else = she did not. β
π¦ AVAILABILITY π¦
btrfs is part of btrfs-progs. Please refer to the documentation at <https://btrfs.readthedocs.io>. π
π SEE ALSO π
btrfs-send(8) <> , mkfs.btrfs(8) <> β go read those too, bestie, they're the other half of the story π
and that's the whole page!! this gorgeousness is from btrfs-progs version 7.3, dated Oct 24, 2026. mwah. π β¨π¦
π¦ where this page comes from
- arch rolling: btrfs-progs 7.3-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms