{"id":2748,"date":"2022-12-20T15:17:11","date_gmt":"2022-12-20T18:17:11","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/btrfsreceive-man8\/"},"modified":"2022-12-20T15:17:11","modified_gmt":"2022-12-20T18:17:11","slug":"btrfsreceive-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/btrfsreceive-man8\/","title":{"rendered":"BTRFS&minus;RECEIVE (man8)"},"content":{"rendered":"<h1 align=\"center\">BTRFS\u2212RECEIVE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#EXIT STATUS\">EXIT STATUS<\/a><br \/> <a href=\"#AVAILABILITY\">AVAILABILITY<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">btrfs-receive \u2212 receive subvolumes from send stream<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfs receive<\/b> [options] <i><path><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">or<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfs receive<\/b> \u2212\u2212dump [options]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Receive a stream of changes and replicate one or more subvolumes that were previously generated by <b>btrfs send<\/b>. The received subvolumes are stored to <i>path<\/i>, unless <i>\u2212\u2212dump<\/i> option is given.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If <i>\u2212\u2212dump<\/i> option is specified, <b>btrfs receive<\/b> will only do the validation of the stream, and print the stream metadata, one operation per line.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfs receive<\/b> will fail in the following cases:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">1. receiving subvolume already exists<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">2. previously received subvolume has been changed after it was received<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">3. default subvolume has changed or you didn\u2019t mount the filesystem at the toplevel subvolume<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A subvolume is made read\u2212only after the receiving process finishes successfully (see BUGS below).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Options<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212f <i><FILE><\/i><\/p>\n<p style=\"margin-left:17%;\">read the stream from <i><FILE><\/i> instead of stdin,<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212C|\u2212\u2212chroot<\/p>\n<p style=\"margin-left:17%;\">confine the process to <i>path<\/i> using <b>chroot<\/b>(1)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212e<\/p>\n<p style=\"margin-left:17%;\">terminate after receiving an <i>end cmd<\/i> marker in the stream.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Without this option the receiver side terminates only in case of an error on end of file.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212E|\u2212\u2212max\u2212errors <i><NERR><\/i><\/p>\n<p style=\"margin-left:17%;\">terminate as soon as NERR errors occur while stream processing commands from the stream<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Default value is 1. A value of 0 means no limit.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212m <i><ROOTMOUNT><\/i><\/p>\n<p style=\"margin-left:17%;\">the root mount point of the destination filesystem<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">By default the mountpoint is searched in <i>\/proc\/self\/mounts<\/i>. If <i>\/proc<\/i> is not accessible, eg. in a chroot environment, use this option to tell us where this filesystem is mounted.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212\u2212dump<\/p>\n<p style=\"margin-left:17%;\">dump the stream metadata, one line per operation<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Does not require the <i>path<\/i> parameter. The filesystem remains unchanged.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212q|\u2212\u2212quiet<\/p>\n<p style=\"margin-left:17%;\">(deprecated) alias for global <i>\u2212q<\/i> option<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212v<\/p>\n<p style=\"margin-left:17%;\">(deprecated) alias for global <i>\u2212v<\/i> option<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Global options<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212v|\u2212\u2212verbose<\/p>\n<p style=\"margin-left:17%;\">increase verbosity about performed actions, print details about each operation<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212q|\u2212\u2212quiet<\/p>\n<p style=\"margin-left:17%;\">suppress all messages except errors<\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfs receive<\/b> sets the subvolume read\u2212only after it completes successfully. However, while the receive is in progress, users who have write access to files or directories in the receiving <i>path<\/i> can add, remove, or modify files, in which case the resulting read\u2212only subvolume will not be an exact copy of the sent subvolume.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the intention is to create an exact copy, the receiving <i>path<\/i> should be protected from access by users until the receive operation has completed and the subvolume is set to read\u2212only.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Additionally, receive does not currently do a very good job of validating that an incremental send stream actually makes sense, and it is thus possible for a specially crafted send stream to create a subvolume with reflinks to arbitrary files in the same filesystem. Because of this, users are advised to not use <b>btrfs receive<\/b> on send streams from untrusted sources, and to protect trusted streams when sending them across untrusted networks.<\/p>\n<h2>EXIT STATUS <a name=\"EXIT STATUS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfs receive<\/b> returns a zero exit status if it succeeds. Non zero is returned in case of failure.<\/p>\n<h2>AVAILABILITY <a name=\"AVAILABILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfs<\/b> is part of btrfs\u2212progs. Please refer to the btrfs wiki <b><font color=\"#0000FF\">http:\/\/btrfs.wiki.kernel.org<\/font><\/b> <font color=\"#000000\">for further details.<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>mkfs.btrfs<\/b>(8), <b>btrfs\u2212send<\/b>(8)<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  btrfs-receive \u2212 receive subvolumes from send stream <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,102,4],"class_list":["post-2748","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-btrfs-receive","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=2748"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2748\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=2748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=2748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=2748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}