96659eed1aa58a8f684ed3ecde75a1580dc8b201
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-send.asciidoc
1 btrfs-send(8)
2 =============
3
4 NAME
5 ----
6 btrfs-send - generate a stream of changes between two subvolumes
7
8 SYNOPSIS
9 --------
10 *btrfs send* [-ve] [-p <parent>] [-c <clone-src>] [-f <outfile>] <subvol> [<subvol>...]
11
12 DESCRIPTION
13 -----------
14
15 This command will generate a stream of instructions that describe changes
16 between two subvolumes. The stream can be consumed by the *btrfs receive*
17 command to replicate the sent subvolume on a different filesystem.
18 The command operates in two modes: full and incremental.
19
20 All subvolumes involved in one send command must be read-only (ie. the
21 read-only snapshots and this status cannot be changed if there's a running send
22 operation that uses the subvolume).
23
24 In the full mode, the entire subvolume data and metadata will end up in the
25 stream.
26
27 In the incremental mode (options '-p' and '-c'), there can be one or more
28 parent subvolumes that will establish the base for determining the changes.
29 The final stream will be smaller compared to the full mode.
30
31 It is allowed to omit the '-p <parent>' option when '-c <clone-src>' options
32 are given, in which case *btrfs send* will determine a suitable parent among the
33 clone sources itself.
34
35 You must not specify clone sources unless you guarantee that these snapshots
36 are exactly in the same state on both sides, the sender and the receiver.
37
38 `Options`
39
40 -e::
41 if sending multiple subvolumes at once, use the new format and omit the
42 'end cmd' marker in the stream separating the subvolumes
43 -p <parent>::
44 send an incremental stream from 'parent' to 'subvol'
45 -c <clone-src>::
46 use this snapshot as a clone source for an incremental send (multiple allowed)
47 -f <outfile>::
48 output is normally written to standard outout so it can be eg. piped to
49 receive, use this option to write it to a file
50 --no-data::
51 send in 'NO_FILE_DATA' mode
52 +
53 The output stream does not contain any file
54 data and thus cannot be used to transfer changes. This mode is faster and
55 useful to show the differences in metadata.
56
57 -v|--verbose::
58 enable verbose output, print generated commands in a readable form, (each
59 occurrence of this option increases the verbosity level)
60 -q|--quiet::
61 suppress all messagese except errors
62
63 EXIT STATUS
64 -----------
65 *btrfs send* returns a zero exit status if it succeeds. Non zero is
66 returned in case of failure.
67
68 AVAILABILITY
69 ------------
70 *btrfs* is part of btrfs-progs.
71 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
72 further details.
73
74 SEE ALSO
75 --------
76 `mkfs.btrfs`(8),
77 `btrfs-receive`(8)