libbtrfsutil: always build libbtrfsutil.so.$MAJOR
[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 subvolume snapshots
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 subvolume snapshots. The stream can be consumed by the *btrfs
17 receive* command to replicate the sent snapshot on a different filesystem.
18 The command operates in two modes: full and incremental.
19
20 All snapshots involved in one send command must be read-only, and this status
21 cannot be changed as long as there's a running send operation that uses the
22 snapshot.
23
24 In the full mode, the entire snapshot data and metadata will end up in the
25 stream.
26
27 In the incremental mode (options '-p' and '-c'), previously sent snapshots that
28 are available on both the sending and receiving side can be used to reduce the
29 amount of information that has to be sent to reconstruct the sent snapshot on a
30 different filesystem.
31
32 The '-p <parent>' option can be omitted when '-c <clone-src>' options are
33 given, in which case *btrfs send* will determine a suitable parent from among
34 the clone sources.
35
36 You must not specify clone sources unless you guarantee that these snapshots
37 are exactly in the same state on both sides--both for the sender and the
38 receiver.
39
40 `Options`
41
42 -e::
43 if sending multiple subvolumes at once, use the new format and omit the
44 'end cmd' marker in the stream separating the subvolumes
45 -p <parent>::
46 send an incremental stream from 'parent' to 'subvol'
47 -c <clone-src>::
48 use this snapshot as a clone source for an incremental send (multiple allowed)
49 -f <outfile>::
50 output is normally written to standard output so it can be, for example, piped
51 to btrfs receive. Use this option to write it to a file instead.
52 --no-data::
53 send in 'NO_FILE_DATA' mode
54 +
55 The output stream does not contain any file
56 data and thus cannot be used to transfer changes. This mode is faster and
57 is useful to show the differences in metadata.
58
59 -v|--verbose::
60 enable verbose output, print generated commands in a readable form, (each
61 occurrence of this option increases the verbosity level)
62 -q|--quiet::
63 suppress all messages except errors
64
65 EXIT STATUS
66 -----------
67 *btrfs send* returns a zero exit status if it succeeds. Non zero is
68 returned in case of failure.
69
70 AVAILABILITY
71 ------------
72 *btrfs* is part of btrfs-progs.
73 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
74 further details.
75
76 SEE ALSO
77 --------
78 `mkfs.btrfs`(8),
79 `btrfs-receive`(8)