{
    "mode": "man",
    "parameter": "cache_restore",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/cache_restore/8/json",
    "generated": "2026-06-03T03:33:30Z",
    "synopsis": "cacherestore [options] -i {xml file} -o {device|file}",
    "sections": {
        "NAME": {
            "content": "cacherestore - restore cache metadata file to device or file.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "cacherestore [options] -i {xml file} -o {device|file}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "cacherestore  restores  cache metadata created by the respective device-mapper target dumped\ninto an XML formatted (see cachedump(8)) file, which optionally can be  preprocessed  before\nthe restore to another device or file.  If restored to a metadata device, the metadata can be\nprocessed 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": "Don't print any output.  Check the exit code to test for success.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-i, --input {xml file}",
                    "content": "Input xml.\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 thin it must be preallocated, and large enough to hold\nthe metadata.\n\n",
                    "flag": "-o",
                    "long": "--output"
                },
                {
                    "name": "--metadata-version {1|2}",
                    "content": "Choose a metadata version.\n",
                    "long": "--metadata-version"
                }
            ]
        },
        "DEBUGGING OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--debug-override-metadata-version {integer}",
                    "content": "Override the version stored in the metadata.\n",
                    "long": "--debug-override-metadata-version"
                },
                {
                    "name": "--omit-clean-shutdown",
                    "content": "Don't set the clean shutdown flag.\n",
                    "long": "--omit-clean-shutdown"
                }
            ]
        },
        "EXAMPLE": {
            "content": "Restores the XML formatted cache metadata on file metadata to logical volume /dev/vg/metadata\nfor further processing by the respective device-mapper target:\n\n$ cacherestore -i metadata -o /dev/vg/metadata\n\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "cacherestore returns an exit code of 0 for success or 1 for error.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "cachedump(8), cachecheck(8), cacherepair(8)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Joe Thornber <ejt@redhat.com>, Heinz Mauelshagen <HeinzM@RedHat.com>\n\n\n\nSystem Manager's Manual                  Device Mapper Tools                        cacherestore(8)",
            "subsections": []
        }
    },
    "summary": "cacherestore - restore cache 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": "Don't print any output. Check the exit code to test for success."
        },
        {
            "flag": "-i",
            "long": "--input",
            "arg": null,
            "description": "Input xml."
        },
        {
            "flag": "-o",
            "long": "--output",
            "arg": null,
            "description": "Output file or device for restored binary metadata. If a file is used thin it must be preallocated, and large enough to hold the metadata."
        },
        {
            "flag": "",
            "long": "--metadata-version",
            "arg": null,
            "description": "Choose a metadata version."
        }
    ],
    "examples": [
        "Restores the XML formatted cache metadata on file metadata to logical volume /dev/vg/metadata",
        "for further processing by the respective device-mapper target:",
        "$ cacherestore -i metadata -o /dev/vg/metadata"
    ],
    "see_also": [
        {
            "name": "cachedump",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cachedump/8/json"
        },
        {
            "name": "cachecheck",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cachecheck/8/json"
        },
        {
            "name": "cacherepair",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cacherepair/8/json"
        }
    ]
}