btrfs-progs: receive: introduce option to dump send stream
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-receive.asciidoc
1 btrfs-receive(8)
2 ================
3
4 NAME
5 ----
6 btrfs-receive - receive subvolumes from send stream
7
8 SYNOPSIS
9 --------
10 *btrfs receive* [options] <path>
11
12 or
13
14 *btrfs receive* --dump [options]
15
16 DESCRIPTION
17 -----------
18
19 Receive a stream of changes and replicate one or more subvolumes that were
20 previously used with *btrfs send* The received subvolumes are stored to
21 'path', if '--dump' option is not given.
22
23 If '--dump' option is given, *btrfs receive* will only do the validation of
24 the stream, and print the stream metadata.
25
26 *btrfs receive* will fail int the following cases:
27
28 1. receiving subvolume already exists
29
30 2. previously received subvolume was changed after it was received
31
32 3. default subvolume has changed or you didn't mount BTRFS filesystem at the toplevel subvolume
33
34 A subvolume is made read-only after the receiving process finishes succesfully.
35
36 `Options`
37
38 -v::
39 enable verbose debug output, print each operation (each occurrence of this
40 option increases the verbosity level)
41
42 -f <infile>::
43 by default, btrfs receive uses standard input to receive the stream,
44 use this option to read from a file instead
45
46 -C|--chroot::
47 confine the process to 'path' using `chroot`(1)
48
49 -e::
50 terminate after receiving an 'end cmd' marker in the stream.
51 +
52 Without this option, the receiver terminates only if an error is encountered
53 or at end of file
54
55 --max-errors <N>::
56 terminate as soon as N errors happened while processing commands from the send
57 stream, default value is 1, 0 means no limit
58
59 -m <mountpoint>::
60 the root mount point of the destination filesystem
61 +
62 By default the mountpoint is searched in '/proc/self/mounts'.
63 If you do not have '/proc', eg. in a chroot environment, use this option to tell
64 us where this filesystem is mounted.
65
66 --dump::
67 print the stream metadata
68 +
69 Does not accept the 'path' parameter. So with this option, *btrfs receive* won't
70 modify your filesystem, and can be run by non-privileged users.
71
72 EXIT STATUS
73 -----------
74 *btrfs receive* returns a zero exit status if it succeeds. Non zero is
75 returned in case of failure.
76
77 AVAILABILITY
78 ------------
79 *btrfs* is part of btrfs-progs.
80 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
81 further details.
82
83 SEE ALSO
84 --------
85 `mkfs.btrfs`(8),
86 `btrfs-send`(8)