6 btrfs-receive - receive subvolumes from send stream
10 *btrfs receive* [options] <path>
14 *btrfs receive* --dump [options]
19 Receive a stream of changes and replicate one or more subvolumes that were
20 previously generated by *btrfs send*. The received subvolumes are stored to
21 'path', unless '--dump' option is given.
23 If '--dump' option is specified, *btrfs receive* will only do the validation of
24 the stream, and print the stream metadata, one operation per line.
26 *btrfs receive* will fail in the following cases:
28 1. receiving subvolume already exists
30 2. previously received subvolume has been changed after it was received
32 3. default subvolume has changed or you didn't mount the filesystem at the toplevel subvolume
34 A subvolume is made read-only after the receiving process finishes successfully (see BUGS below).
39 increase verbosity about performed actions, print details about each operation
42 read the stream from <FILE> instead of stdin,
45 confine the process to 'path' using `chroot`(1)
48 terminate after receiving an 'end cmd' marker in the stream.
50 Without this option the receiver side terminates only in case
51 of an error on end of file.
53 -E|--max-errors <NERR>::
54 terminate as soon as NERR errors occur while stream processing commands from
57 Default value is 1. A value of 0 means no limit.
60 the root mount point of the destination filesystem
62 By default the mountpoint is searched in '/proc/self/mounts'.
63 If '/proc' is not accessible, eg. in a chroot environment, use this option to
64 tell us where this filesystem is mounted.
67 dump the stream metadata, one line per operation
69 Does not require the 'path' parameter. The filesystem remains unchanged.
73 *btrfs receive* sets the subvolume read-only after it completes
74 successfully. However, while the receive is in progress, users who have
75 write access to files or directories in the receiving 'path' can add,
76 remove, or modify files, in which case the resulting read-only subvolume
77 will not be an exact copy of the sent subvolume.
79 If the intention is to create an exact copy, the receiving 'path'
80 should be protected from access by users until the receive operation
81 has completed and the subvolume is set to read-only.
83 Additionally, receive does not currently do a very good job of validating
84 that an incremental send stream actually makes sense, and it is thus
85 possible for a specially crafted send stream to create a subvolume with
86 reflinks to arbitrary files in the same filesystem. Because of this,
87 users are advised to not use *btrfs receive* on send streams from
88 untrusted sources, and to protect trusted streams when sending them
89 across untrusted networks.
93 *btrfs receive* returns a zero exit status if it succeeds. Non zero is
94 returned in case of failure.
98 *btrfs* is part of btrfs-progs.
99 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for