1BTRFS-SEND(8)                        BTRFS                       BTRFS-SEND(8)
2
3
4

NAME

6       btrfs-send  -  generate a stream of changes between two subvolume snap‐
7       shots
8

SYNOPSIS

10       btrfs send [-ve] [-p <parent>] [-c <clone-src>] [-f <outfile>] <subvol>
11       [<subvol>...]
12

DESCRIPTION

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 subvolumes
48
49       -p <parent>
50              send an incremental stream from parent to subvol
51
52       -c <clone-src>
53              use this snapshot as a clone  source  for  an  incremental  send
54              (multiple allowed)
55
56       -f <outfile>
57              output  is normally written to standard output so it can be, for
58              example, piped to btrfs receive. Use this option to write it  to
59              a file instead.
60
61       --no-data
62              send in NO_FILE_DATA mode
63
64              The output stream does not contain any file data and thus cannot
65              be used to transfer changes. This mode is faster and  is  useful
66              to show the differences in metadata.
67
68       --proto <N>
69              use send protocol version N
70
71              The  default is 1, which was the original protocol version. Ver‐
72              sion 2 encodes file data slightly more efficiently; it  is  also
73              required  for  sending  compressed  data  directly  (see  --com‐
74              pressed-data). Version 2 requires at least  btrfs-progs  6.0  on
75              both  the  sender  and  receiver  and  at least Linux 6.0 on the
76              sender. Passing 0 means to use the highest version supported  by
77              the running kernel.
78
79       --compressed-data
80              send  data that is compressed on the filesystem directly without
81              decompressing it
82
83              If  the  receiver  supports  the  BTRFS_IOC_ENCODED_WRITE  ioctl
84              (added  in Linux 6.0), it can also write it directly without de‐
85              compressing it.  Otherwise, the receiver will fall back  to  de‐
86              compressing it and writing it normally.
87
88              This  requires  protocol version 2 or higher. If --proto was not
89              used, then --compressed-data implies --proto 2.
90
91       -q|--quiet
92              (deprecated) alias for global -q option
93
94       -v|--verbose
95              (deprecated) alias for global -v option
96
97       Global options
98
99       -q|--quiet
100              suppress all messages except errors
101
102       -v|--verbose
103              increase output verbosity, print generated commands in  a  read‐
104              able form
105

EXIT STATUS

107       btrfs  send  returns a zero exit status if it succeeds. Non zero is re‐
108       turned in case of failure.
109

AVAILABILITY

111       btrfs is part of btrfs-progs.  Please refer  to  the  documentation  at
112       https://btrfs.readthedocs.io.
113

SEE ALSO

115       btrfs-receive(8), btrfs-subvolume(8), mkfs.btrfs(8)
116
117
118
119
1206.6.2                            Nov 24, 2023                    BTRFS-SEND(8)
Impressum