{
    "mode": "man",
    "parameter": "thin_restore",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/thin_restore/8/json",
    "generated": "2026-10-05T03:35:39Z",
    "synopsis": "thinrestore [options] -i {xml file} -o {device|file}",
    "sections": {
        "NAME": {
            "content": "thinrestore - restore thin provisioning metadata file to device or file.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "thinrestore [options] -i {xml file} -o {device|file}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "thinrestore restores thin provisioning metadata created by the respective device-mapper tar‐\nget  dumped  into  an  XML  formatted  (see  thindump(8)) file, which optionally can be pre‐\nprocessed before the restore to another device or file. If restored to a metadata device, the\nmetadata can be processed by the device-mapper target.\n\nThis tool cannot be run on live metadata.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-h, --help",
                    "content": "Print help and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-V, --version",
                    "content": "Print version information and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-q, --quiet",
                    "content": "Suppress output messages, return only exit code.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-i, --input {xml file}",
                    "content": "Input file containing XML metadata.\n",
                    "flag": "-i",
                    "long": "--input"
                },
                {
                    "name": "-o, --output {device|file}",
                    "content": "Output file or device for restored binary metadata.\n\nIf a file is used for output, then it must be preallocated, and large\nenough to hold the metadata.\n\n",
                    "flag": "-o",
                    "long": "--output"
                },
                {
                    "name": "--transaction-id {natural}",
                    "content": "Override the transaction id given in the input xml.\n",
                    "long": "--transaction-id"
                },
                {
                    "name": "--data-block-size {natural}",
                    "content": "Override the data block size given in the input xml.\n",
                    "long": "--data-block-size"
                },
                {
                    "name": "--nr-data-blocks {natural}",
                    "content": "Override the nr data blocks given in the input xml.\n",
                    "long": "--nr-data-blocks"
                }
            ]
        },
        "EXAMPLE": {
            "content": "Restores the XML formatted thin provisioning metadata on  file  metadata  to  logical  volume\n/dev/vg/metadata for further processing by the respective device-mapper target:\n\n$ thinrestore -i metadata -o /dev/vg/metadata\n\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "thinrestore returns an exit code of 0 for success or 1 for error.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "thindump(8), thincheck(8), thinrepair(8), thinrmap(8), thinmetadatasize(8)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Joe Thornber <ejt@redhat.com>, Heinz Mauelshagen <HeinzM@RedHat.com>\n\nSystem Manager's Manual                  Device Mapper Tools                         thinrestore(8)",
            "subsections": []
        }
    },
    "summary": "thinrestore - restore thin provisioning metadata file to device or file.",
    "flags": [
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Print help and exit."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Print version information and exit."
        },
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Suppress output messages, return only exit code."
        },
        {
            "flag": "-i",
            "long": "--input",
            "arg": null,
            "description": "Input file containing XML metadata."
        },
        {
            "flag": "-o",
            "long": "--output",
            "arg": null,
            "description": "Output file or device for restored binary metadata. If a file is used for output, then it must be preallocated, and large enough to hold the metadata."
        },
        {
            "flag": "",
            "long": "--transaction-id",
            "arg": null,
            "description": "Override the transaction id given in the input xml."
        },
        {
            "flag": "",
            "long": "--data-block-size",
            "arg": null,
            "description": "Override the data block size given in the input xml."
        },
        {
            "flag": "",
            "long": "--nr-data-blocks",
            "arg": null,
            "description": "Override the nr data blocks given in the input xml."
        }
    ],
    "examples": [
        "Restores the XML formatted thin provisioning metadata on  file  metadata  to  logical  volume",
        "/dev/vg/metadata for further processing by the respective device-mapper target:",
        "$ thinrestore -i metadata -o /dev/vg/metadata"
    ],
    "see_also": [
        {
            "name": "thindump",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thindump/8/json"
        },
        {
            "name": "thincheck",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thincheck/8/json"
        },
        {
            "name": "thinrepair",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thinrepair/8/json"
        },
        {
            "name": "thinrmap",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thinrmap/8/json"
        },
        {
            "name": "thinmetadatasize",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thinmetadatasize/8/json"
        }
    ]
}