'\" t
.\" Title: btrfs-receive
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1
.\" Date: 11/22/2014
.\" Manual: Btrfs Manual
.\" Source: Btrfs v3.17
.\" Language: English
.\"
.TH "BTRFS\-RECEIVE" "8" "11/22/2014" "Btrfs v3\&.17" "Btrfs Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
btrfs-receive \- receive subvolumes from stdin/file\&.
.SH "SYNOPSIS"
.sp
\fBbtrfs receive\fR [\-ve] [\-f \fI\fR] [\-\-max\-errors \fI\fR] \fI\fR
.SH "DESCRIPTION"
.sp
Receives one or more subvolumes that were previously sent with \fBbtrfs send\fR\&. The received subvolumes are stored into \fI\fR\&.
.sp
\fBbtrfs receive\fR will fail with the following case:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
a receiving subvolume already exists\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
a previously received subvolume was changed after it was received\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 3.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 3." 4.2
.\}
default subvolume is changed or you don\(cqt mount btrfs filesystem with fs tree\&.
.RE
.sp
After receiving a subvolume, it is immediately set to read only\&.
.sp
\fBOptions\fR
.PP
\-v
.RS 4
Enable verbose debug output\&. Each occurrence of this option increases the verbose level more\&.
.RE
.PP
\-f \fI\fR
.RS 4
By default, btrfs receive uses stdin to receive the subvolumes\&. Use this option to specify a file to use instead\&.
.RE
.PP
\-e
.RS 4
Terminate after receiving an
\fI\fR
in the data stream\&. Without this option, the receiver terminates only if an error is recognized or on EOF\&.
.RE
.PP
\-\-max\-errors \fI\fR
.RS 4
Terminate as soon as N errors happened while processing commands from the send stream\&. Default value is 1\&. A value of 0 means no limit\&.
.RE
.SH "EXIT STATUS"
.sp
\fBbtrfs receive\fR returns a zero exit status if it succeeds\&. Non zero is returned in case of failure\&.
.SH "AVAILABILITY"
.sp
\fBbtrfs\fR is part of btrfs\-progs\&. Please refer to the btrfs wiki \m[blue]\fBhttp://btrfs\&.wiki\&.kernel\&.org\fR\m[] for further details\&.
.SH "SEE ALSO"
.sp
\fBmkfs\&.btrfs\fR(8), \fBbtrfs\-send\fR(8)