1BTRFS-SEND(8) BTRFS BTRFS-SEND(8)
2
3
4
6 btrfs-send - generate a stream of changes between two subvolume snap‐
7 shots
8
10 btrfs send [-ve] [-p <parent>] [-c <clone-src>] [-f <outfile>] <subvol>
11 [<subvol>...]
12
14 This command will generate a stream of instructions that describe
15 changes between two subvolume snapshots. The stream can be consumed by
16 the btrfs receive command to replicate the sent snapshot on a different
17 filesystem. The command operates in two modes: full and incremental.
18
19 All snapshots involved in one send command must be read-only, and this
20 status cannot be changed as long as there's a running send operation
21 that uses the snapshot. Read-only mount of the subvolume is not suffi‐
22 cient, there's no way to guarantee that there won't be any other
23 writable mount of the same subvolume that would potentially write while
24 send would be running.
25
26 In the full mode, the entire snapshot data and metadata will end up in
27 the stream.
28
29 In the incremental mode (options -p and -c), previously sent snapshots
30 that are available on both the sending and receiving side can be used
31 to reduce the amount of information that has to be sent to reconstruct
32 the sent snapshot on a different filesystem.
33
34 The -p <parent> option can be omitted when -c <clone-src> options are
35 given, in which case btrfs send will determine a suitable parent from
36 among the clone sources.
37
38 You must not specify clone sources unless you guarantee that these
39 snapshots are exactly in the same state on both sides--both for the
40 sender and the receiver. For implications of changed read-write status
41 of a received snapshot please see section SUBVOLUME FLAGS in
42 btrfs-subvolume(8).
43
44 Options
45
46 -e if sending multiple subvolumes at once, use the new format and
47 omit the 'end cmd' marker in the stream separating the subvol‐
48 umes
49
50 -p <parent>
51 send an incremental stream from parent to subvol
52
53 -c <clone-src>
54 use this snapshot as a clone source for an incremental send
55 (multiple allowed)
56
57 -f <outfile>
58 output is normally written to standard output so it can be, for
59 example, piped to btrfs receive. Use this option to write it to
60 a file instead.
61
62 --no-data
63 send in NO_FILE_DATA mode
64
65 The output stream does not contain any file data and thus cannot
66 be used to transfer changes. This mode is faster and is useful
67 to show the differences in metadata.
68
69 --proto <N>
70 use send protocol version N
71
72 The default is 1, which was the original protocol version. Ver‐
73 sion 2 encodes file data slightly more efficiently; it is also
74 required for sending compressed data directly (see --com‐
75 pressed-data). Version 2 requires at least btrfs-progs 6.0 on
76 both the sender and receiver and at least Linux 6.0 on the
77 sender. Passing 0 means to use the highest version supported by
78 the running kernel.
79
80 --compressed-data
81 send data that is compressed on the filesystem directly without
82 decompressing it
83
84 If the receiver supports the BTRFS_IOC_ENCODED_WRITE ioctl
85 (added in Linux 6.0), it can also write it directly without de‐
86 compressing it. Otherwise, the receiver will fall back to de‐
87 compressing it and writing it normally.
88
89 This requires protocol version 2 or higher. If --proto was not
90 used, then --compressed-data implies --proto 2.
91
92 -q|--quiet
93 (deprecated) alias for global -q option
94
95 -v|--verbose
96 (deprecated) alias for global -v option
97
98 Global options
99
100 -q|--quiet
101 suppress all messages except errors
102
103 -v|--verbose
104 increase output verbosity, print generated commands in a read‐
105 able form
106
108 btrfs send returns a zero exit status if it succeeds. Non zero is re‐
109 turned in case of failure.
110
112 btrfs is part of btrfs-progs. Please refer to the documentation at
113 https://btrfs.readthedocs.io or wiki http://btrfs.wiki.kernel.org for
114 further information.
115
117 btrfs-receive(8), btrfs-subvolume(8), mkfs.btrfs(8)
118
119
120
121
1226.1.3 Jan 25, 2023 BTRFS-SEND(8)