{
    "mode": "man",
    "parameter": "BTRFS-RECEIVE",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/BTRFS-RECEIVE/json",
    "generated": "2026-10-22T12:34:38Z",
    "synopsis": "btrfs receive [options] <path>\nor\nbtrfs receive --dump [options]",
    "sections": {
        "NAME": {
            "content": "btrfs-receive - receive subvolumes from send stream\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "btrfs receive [options] <path>\n\nor\n\nbtrfs receive --dump [options]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Receive  a stream of changes and replicate one or more subvolumes that were previously gener‐\nated by btrfs send. The received subvolumes are stored  to  path,  unless  --dump  option  is\ngiven.\n\nIf  --dump  option is specified, btrfs receive will only do the validation of the stream, and\nprint the stream metadata, one operation per line.\n\nbtrfs receive will fail in the following cases:\n\n1. receiving subvolume already exists\n\n2. previously received subvolume has been changed after it was received\n\n3. default subvolume has changed or you didn't mount the filesystem at the toplevel subvolume\n\nA subvolume is made read-only after the receiving process finishes successfully (see BUGS be‐\nlow).\n",
            "subsections": [
                {
                    "name": "Options",
                    "content": ""
                },
                {
                    "name": "-f _",
                    "content": "read the stream from FILE instead of stdin,\n",
                    "flag": "-f"
                },
                {
                    "name": "-C|--chroot",
                    "content": "confine the process to path using chroot(1)\n"
                },
                {
                    "name": "-e",
                    "content": "Without this option the receiver side terminates only in case of an error  on  end  of\nfile.\n",
                    "flag": "-e"
                },
                {
                    "name": "-E|--max-errors <NERR>",
                    "content": "terminate  as  soon  as  NERR  errors  occur while stream processing commands from the\nstream\n\nDefault value is 1. A value of 0 means no limit.\n"
                },
                {
                    "name": "-m _",
                    "content": "the root mount point of the destination filesystem\n\nBy default the mount point is searched in :file:/proc/self/mounts`.  If /proc  is  not\naccessible,  e.g.  in  a  chroot  environment,  use  this option to tell us where this\nfilesystem is mounted.\n",
                    "flag": "-m"
                },
                {
                    "name": "--force-decompress",
                    "content": "if the stream contains compressed data (see --compressed-data in  btrfs-send(8)),  al‐\nways decompress it instead of writing it with encoded I/O\n\n--dump dump the stream metadata, one line per operation\n\nDoes not require the path parameter. The filesystem remains unchanged.\n",
                    "long": "--force-decompress"
                },
                {
                    "name": "-q|--quiet",
                    "content": "(deprecated) alias for global -q option\n"
                },
                {
                    "name": "-v     (deprecated)",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "Global options",
                    "content": ""
                },
                {
                    "name": "-v|--verbose",
                    "content": "increase verbosity about performed actions, print details about each operation\n"
                },
                {
                    "name": "-q|--quiet",
                    "content": "suppress all messages except errors\n"
                }
            ]
        },
        "BUGS": {
            "content": "btrfs  receive  sets the subvolume read-only after it completes successfully.  However, while\nthe receive is in progress, users who have write access to files or directories  in  the  re‐\nceiving  path can add, remove, or modify files, in which case the resulting read-only subvol‐\nume will not be an exact copy of the sent subvolume.\n\nIf the intention is to create an exact copy, the receiving path should be protected from  ac‐\ncess  by  users  until  the  receive  operation  has  completed  and  the subvolume is set to\nread-only.\n\nAdditionally, receive does not currently do a very good job of validating that an incremental\nsend stream actually makes sense, and it is thus possible for a specially crafted send stream\nto create a subvolume with reflinks to arbitrary files in the same  filesystem.   Because  of\nthis,  users are advised to not use btrfs receive on send streams from untrusted sources, and\nto protect trusted streams when sending them across untrusted networks.\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "btrfs receive returns a zero exit status if it succeeds. Non zero  is  returned  in  case  of\nfailure.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "btrfs    is    part    of    btrfs-progs.     Please    refer   to   the   documentation   at\nhttps://btrfs.readthedocs.io.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "btrfs-send(8), mkfs.btrfs(8)\n\n\n6.6.3                                       Mar 31, 2024                            BTRFS-RECEIVE(8)",
            "subsections": []
        }
    },
    "summary": "btrfs-receive - receive subvolumes from send stream",
    "flags": [
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "read the stream from FILE instead of stdin,"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "confine the process to path using chroot(1)"
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": "Without this option the receiver side terminates only in case of an error on end of file."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "terminate as soon as NERR errors occur while stream processing commands from the stream Default value is 1. A value of 0 means no limit."
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "the root mount point of the destination filesystem By default the mount point is searched in :file:/proc/self/mounts`. If /proc is not accessible, e.g. in a chroot environment, use this option to tell us where this filesystem is mounted."
        },
        {
            "flag": "",
            "long": "--force-decompress",
            "arg": null,
            "description": "if the stream contains compressed data (see --compressed-data in btrfs-send(8)), al‐ ways decompress it instead of writing it with encoded I/O --dump dump the stream metadata, one line per operation Does not require the path parameter. The filesystem remains unchanged."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "(deprecated) alias for global -q option"
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "increase verbosity about performed actions, print details about each operation"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "suppress all messages except errors"
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "btrfs-send",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/btrfs-send/8/json"
        },
        {
            "name": "mkfs.btrfs",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/mkfs.btrfs/8/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "The examples for this command have been moved together with `btrfs send`.",
        "examples": [
            {
                "description": "View documentation for `btrfs receive`",
                "command": "tldr btrfs send"
            }
        ]
    }
}