1BTRFS-RECEIVE(8)                 Btrfs Manual                 BTRFS-RECEIVE(8)
2
3
4

NAME

6       btrfs-receive - receive subvolumes from send stream
7

SYNOPSIS

9       btrfs receive [options] <path>
10
11       or
12
13       btrfs receive --dump [options]
14

DESCRIPTION

16       Receive a stream of changes and replicate one or more subvolumes that
17       were previously generated by btrfs send. The received subvolumes are
18       stored to path, unless --dump option is given.
19
20       If --dump option is specified, btrfs receive will only do the
21       validation of the stream, and print the stream metadata, one operation
22       per line.
23
24       btrfs receive will fail in the following cases:
25
26        1. receiving subvolume already exists
27
28        2. previously received subvolume has been changed after it was
29           received
30
31        3. default subvolume has changed or you didn’t mount the filesystem at
32           the toplevel subvolume
33
34       A subvolume is made read-only after the receiving process finishes
35       successfully (see BUGS below).
36
37       Options
38
39       -f <FILE>
40           read the stream from <FILE> instead of stdin,
41
42       -C|--chroot
43           confine the process to path using chroot(1)
44
45       -e
46           terminate after receiving an end cmd marker in the stream.
47
48           Without this option the receiver side terminates only in case of an
49           error on end of file.
50
51       -E|--max-errors <NERR>
52           terminate as soon as NERR errors occur while stream processing
53           commands from the stream
54
55           Default value is 1. A value of 0 means no limit.
56
57       -m <ROOTMOUNT>
58           the root mount point of the destination filesystem
59
60           By default the mountpoint is searched in /proc/self/mounts. If
61           /proc is not accessible, eg. in a chroot environment, use this
62           option to tell us where this filesystem is mounted.
63
64       --dump
65           dump the stream metadata, one line per operation
66
67           Does not require the path parameter. The filesystem remains
68           unchanged.
69
70       -q|--quiet
71           (deprecated) alias for global -q option
72
73       -v
74           (deprecated) alias for global -v option
75
76       Global options
77
78       -v|--verbose
79           increase verbosity about performed actions, print details about
80           each operation
81
82       -q|--quiet
83           suppress all messages except errors
84

BUGS

86       btrfs receive sets the subvolume read-only after it completes
87       successfully. However, while the receive is in progress, users who have
88       write access to files or directories in the receiving path can add,
89       remove, or modify files, in which case the resulting read-only
90       subvolume will not be an exact copy of the sent subvolume.
91
92       If the intention is to create an exact copy, the receiving path should
93       be protected from access by users until the receive operation has
94       completed and the subvolume is set to read-only.
95
96       Additionally, receive does not currently do a very good job of
97       validating that an incremental send stream actually makes sense, and it
98       is thus possible for a specially crafted send stream to create a
99       subvolume with reflinks to arbitrary files in the same filesystem.
100       Because of this, users are advised to not use btrfs receive on send
101       streams from untrusted sources, and to protect trusted streams when
102       sending them across untrusted networks.
103

EXIT STATUS

105       btrfs receive returns a zero exit status if it succeeds. Non zero is
106       returned in case of failure.
107

AVAILABILITY

109       btrfs is part of btrfs-progs. Please refer to the btrfs wiki
110       http://btrfs.wiki.kernel.org for further details.
111

SEE ALSO

113       mkfs.btrfs(8), btrfs-send(8)
114
115
116
117Btrfs v5.15.1                     11/22/2021                  BTRFS-RECEIVE(8)
Impressum