| 1 |
.\" Man page generated from reStructuredText |
| 2 |
.\" by the Docutils 0.22.4 manpage writer. |
| 3 |
. |
| 4 |
. |
| 5 |
.nr rst2man-indent-level 0 |
| 6 |
. |
| 7 |
.de1 rstReportMargin |
| 8 |
\\$1 \\n[an-margin] |
| 9 |
level \\n[rst2man-indent-level] |
| 10 |
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 11 |
- |
| 12 |
\\n[rst2man-indent0] |
| 13 |
\\n[rst2man-indent1] |
| 14 |
\\n[rst2man-indent2] |
| 15 |
.. |
| 16 |
.de1 INDENT |
| 17 |
.\" .rstReportMargin pre: |
| 18 |
. RS \\$1 |
| 19 |
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
| 20 |
. nr rst2man-indent-level +1 |
| 21 |
.\" .rstReportMargin post: |
| 22 |
.. |
| 23 |
.de UNINDENT |
| 24 |
. RE |
| 25 |
.\" indent \\n[an-margin] |
| 26 |
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 27 |
.nr rst2man-indent-level -1 |
| 28 |
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 29 |
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
| 30 |
.. |
| 31 |
.TH "BTRFS-SEND" "8" "May 10, 2026" "7.0" "BTRFS" |
| 32 |
.SH NAME |
| 33 |
btrfs-send \- generate a stream of changes between two subvolume snapshots |
| 34 |
.SH SYNOPSIS |
| 35 |
.sp |
| 36 |
\fBbtrfs send\fP [\-ve] [\-p <parent>] [\-c <clone\-src>] [\-f <outfile>] <subvol> [<subvol>...] |
| 37 |
.SH DESCRIPTION |
| 38 |
.sp |
| 39 |
This command will generate a stream of instructions that describe changes |
| 40 |
between two subvolume snapshots. The stream can be consumed by the \fBbtrfs receive\fP |
| 41 |
command to replicate the sent snapshot on a different filesystem. |
| 42 |
The command operates in two modes: full and incremental. |
| 43 |
.sp |
| 44 |
All snapshots involved in one send command must be read\-only, and this status |
| 45 |
cannot be changed as long as there\(aqs a running send operation that uses the |
| 46 |
snapshot. Read\-only mount of the subvolume is not sufficient, there\(aqs no way to |
| 47 |
guarantee that there won\(aqt be any other writable mount of the same subvolume |
| 48 |
that would potentially write while send would be running. |
| 49 |
.sp |
| 50 |
In the full mode, the entire snapshot data and metadata will end up in the |
| 51 |
stream. |
| 52 |
.sp |
| 53 |
In the incremental mode (options \fI\-p\fP and \fI\-c\fP), previously sent snapshots that |
| 54 |
are available on both the sending and receiving side can be used to reduce the |
| 55 |
amount of information that has to be sent to reconstruct the sent snapshot on a |
| 56 |
different filesystem. |
| 57 |
.sp |
| 58 |
The \fI\-p <parent>\fP option can be omitted when \fI\-c <clone\-src>\fP options are |
| 59 |
given, in which case \fBbtrfs send\fP will determine a suitable parent from among |
| 60 |
the clone sources. |
| 61 |
.sp |
| 62 |
You must not specify clone sources unless you guarantee that these snapshots |
| 63 |
are exactly in the same state on both sides\-\-both for the sender and the |
| 64 |
receiver. For implications of changed read\-write status of a received snapshot |
| 65 |
please see section \fISUBVOLUME FLAGS\fP in btrfs\-subvolume(8) \%<>\&. |
| 66 |
.sp |
| 67 |
\fBOptions\fP |
| 68 |
.INDENT 0.0 |
| 69 |
.TP |
| 70 |
.B \-e |
| 71 |
if sending multiple subvolumes at once, use the new format and omit the |
| 72 |
\fIend cmd\fP marker in the stream separating the subvolumes |
| 73 |
.TP |
| 74 |
.BI \-p \ <parent> |
| 75 |
send an incremental stream from \fIparent\fP to \fIsubvol\fP |
| 76 |
.TP |
| 77 |
.BI \-c \ <clone\-src> |
| 78 |
use this snapshot as a clone source for an incremental send (multiple |
| 79 |
allowed) |
| 80 |
.TP |
| 81 |
.BI \-f \ <outfile> |
| 82 |
output is normally written to standard output so it can be, for |
| 83 |
example, piped to btrfs receive. Use this option to write it to a file |
| 84 |
instead. |
| 85 |
.TP |
| 86 |
.B \-\-no\-data |
| 87 |
send in \fINO_FILE_DATA\fP mode |
| 88 |
.sp |
| 89 |
The output stream does not contain any file data and thus cannot be |
| 90 |
used to transfer changes. This mode is faster and is useful to show the |
| 91 |
differences in metadata. |
| 92 |
.TP |
| 93 |
.BI \-\-proto \ <N> |
| 94 |
use send protocol version N |
| 95 |
.sp |
| 96 |
The default is 1, which was the original protocol version. Version 2 |
| 97 |
encodes file data slightly more efficiently; it is also required for |
| 98 |
sending compressed data directly (see \fI\-\-compressed\-data\fP). Version 2 |
| 99 |
requires at least btrfs\-progs 6.0 on both the sender and receiver and |
| 100 |
at least Linux 6.0 on the sender. Passing 0 means to use the highest |
| 101 |
version supported by the running kernel. |
| 102 |
.TP |
| 103 |
.B \-\-compressed\-data |
| 104 |
send data that is compressed on the filesystem directly without |
| 105 |
decompressing it |
| 106 |
.sp |
| 107 |
If the receiver supports the \fIBTRFS_IOC_ENCODED_WRITE\fP ioctl (added in |
| 108 |
Linux 6.0), it can also write it directly without decompressing it. |
| 109 |
Otherwise, the receiver will fall back to decompressing it and writing |
| 110 |
it normally. |
| 111 |
.sp |
| 112 |
This requires protocol version 2 or higher. If \fI\-\-proto\fP was not used, |
| 113 |
then \fI\-\-compressed\-data\fP implies \fI\-\-proto 2\fP\&. |
| 114 |
.UNINDENT |
| 115 |
.INDENT 0.0 |
| 116 |
.TP |
| 117 |
.B \-q|\-\-quiet |
| 118 |
(deprecated) alias for global \fI\-q\fP option |
| 119 |
.TP |
| 120 |
.B \-v|\-\-verbose |
| 121 |
(deprecated) alias for global \fI\-v\fP option |
| 122 |
.UNINDENT |
| 123 |
.sp |
| 124 |
\fBGlobal options\fP |
| 125 |
.INDENT 0.0 |
| 126 |
.TP |
| 127 |
.B \-q|\-\-quiet |
| 128 |
suppress all messages except errors |
| 129 |
.TP |
| 130 |
.B \-v|\-\-verbose |
| 131 |
increase output verbosity, print generated commands in a readable form |
| 132 |
.UNINDENT |
| 133 |
.SH EXIT STATUS |
| 134 |
.sp |
| 135 |
\fBbtrfs send\fP returns a zero exit status if it succeeds. Non zero is |
| 136 |
returned in case of failure. |
| 137 |
.SH AVAILABILITY |
| 138 |
.sp |
| 139 |
\fBbtrfs\fP is part of btrfs\-progs. Please refer to the documentation at |
| 140 |
\%<https://\:btrfs\:.readthedocs\:.io>\&. |
| 141 |
.SH SEE ALSO |
| 142 |
.sp |
| 143 |
btrfs\-receive(8) \%<>, |
| 144 |
btrfs\-subvolume(8) \%<>, |
| 145 |
mkfs.btrfs(8) \%<> |
| 146 |
.\" End of generated man page. |