summaryrefslogtreecommitdiff
path: root/Documentation/btrfs-receive.asciidoc
blob: fbbded21bb51453fdaafb57143d4980daf3d48f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
btrfs-receive(8)
================

NAME
----
btrfs-receive - receive subvolumes from send stream

SYNOPSIS
--------
*btrfs receive* [options] <mount>

DESCRIPTION
-----------

Receive a stream of changes and replicate one or more subvolumes that were
previously used with *btrfs send* The received subvolumes are stored to
'mount'.

*btrfs receive* will fail int the following cases:

1. receiving subvolume already exists

2. previously received subvolume was changed after it was received

3. default subvolume has changed or you didn't mount BTRFS filesystem at the toplevel subvolume

A subvolume is made read-only after the receiving process finishes succesfully.

`Options`

-v::
enable verbose debug output, print each operation (each occurrence of this
option increases the verbosity level)

-f <infile>::
by default, btrfs receive uses standard input to receive the stream,
use this option to read from a file instead

-C|--chroot::
confine the process to 'mount' using `chroot`(1)

-e::
terminate after receiving an 'end cmd' marker in the stream.
+
Without this option, the receiver terminates only if an error is encountered
or at end of file

--max-errors <N>::
terminate as soon as N errors happened while processing commands from the send
stream, default value is 1, 0 means no limit

-m <mountpoint>::
the root mount point of the destination filesystem
+
By default the mountpoint is searched in '/proc/self/mounts'.
If you do not have '/proc', eg. in a chroot environment, use this option to tell
us where this filesystem is mounted.

EXIT STATUS
-----------
*btrfs receive* returns a zero exit status if it succeeds. Non zero is
returned in case of failure.

AVAILABILITY
------------
*btrfs* is part of btrfs-progs.
Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
further details.

SEE ALSO
--------
`mkfs.btrfs`(8),
`btrfs-send`(8)