cache_restore â restore cache metadata file to device or file.
| Use Case | Command | Description |
|---|---|---|
| đ Restore metadata from XML to device | cache_restore -i metadata.xml -o /dev/vg/metadata | Restore cache metadata from XML file to a logical volume for use by device-mapper target |
| đ Specify metadata version | cache_restore -i metadata.xml -o /dev/vg/metadata --metadata-version 2 | Restore with a specific metadata version (1 or 2) |
| đ Quiet mode (no output) | cache_restore -q -i metadata.xml -o /dev/vg/metadata | Suppress all output; check exit code for success |
| â Display help | cache_restore -h | Print help and exit |
| âšī¸ Version info | cache_restore -V | Print version information and exit |
cache_restore [options] -i {xml file} -o {device|file}
cache_restore restores cache metadata created by the respective device-mapper target dumped into an XML formatted (see cache_dump(8)) file, which optionally can be preprocessed before the restore to another device or file. If restored to a metadata device, the metadata can be processed by the device-mapper target.
This tool cannot be run on live metadata.
-h, --help â Print help and exit.
-V, --version â Print version information and exit.
-q, --quiet â Don't print any output. Check the exit code to test for success.
-i, --input {xml file} â Input xml.
-o, --output {device|file} â Output file or device for restored binary metadata. If a file is used, it must be preallocated and large enough to hold the metadata.
--metadata-version {1|2} â Choose a metadata version.
--debug-override-metadata-version {integer} â Override the version stored in the metadata.
--omit-clean-shutdown â Don't set the clean shutdown flag.
Restores the XML formatted cache metadata on file metadata to logical volume /dev/vg/metadata for further processing by the respective device-mapper target:
$ cache_restore -i metadata -o /dev/vg/metadata
cache_restore returns an exit code of 0 for success or 1 for error.
cache_dump(8), cache_check(8), cache_repair(8)
Joe Thornber <ejt AT redhat.com>, Heinz Mauelshagen <HeinzM AT RedHat.com>
Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-28 04:03 @216.73.216.67
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)