cache_restore(8)

๐Ÿ“ฆ
version 1.3.4 ยท 2 versions
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

โœจ cache_restore(8) โœจ

okay bestie, this is the manual page for cache_restore, the tool that is literally the glow-up for your cache metadata ๐Ÿ’–

๐ŸŽ€ NAME ๐ŸŽ€

cache_restore - restore cache metadata file to device or file. ๐Ÿฆ‹

๐Ÿ”ฎ SYNOPSIS ๐Ÿ”ฎ

cache_restore [options] -i {xml file} -o {device|file}

๐Ÿ’… DESCRIPTION ๐Ÿ’…

okay so cache_restore takes cache metadata that was dumped into an XML formatted file (see cache_dump(8)) and rebuilds it as binary metadata. the XML was made by the respective device-mapper target, and you can optionally tidy it up before the restore, then send it to another device or file ๐ŸŒธ if you restore onto a metadata device, the device-mapper target can then process that metadata. iconic behavior ngl โœจ

๐Ÿ’€ Big warning: this tool cannot be run on live metadata. don't even try it, bestie ๐Ÿ™ˆ

๐ŸŒˆ OPTIONS ๐ŸŒˆ

  • -h, --help โ€” slides in with the help text and then exits ๐Ÿ’–
  • -V, --version โ€” shows you the version info and then exits ๐Ÿฆ‹
  • -q, --quiet โ€” no output at all, zero chatter ๐Ÿคซ you check the exit code to see if it worked
  • -i, --input {xml file} โ€” the input XML, the thing we're restoring from ๐Ÿ“„
  • -o, --output {device|file} โ€” the output file or device where the restored binary metadata lands ๐ŸŽฏ
โš ๏ธ Heads up: if you're using a file, it has to be preallocated (it's giving thin provisioning vibes) and it needs to be big enough to hold the metadata. no cap, this matters ๐Ÿ’…
  • --metadata-version {1|2} โ€” pick which metadata version you want ๐Ÿงš

๐Ÿ› ๏ธ DEBUGGING OPTIONS ๐Ÿ› ๏ธ

these are for the nerdy stuff, so use with care ๐Ÿค“

  • --debug-override-metadata-version {integer} โ€” overrides the version that's stored in the metadata ๐Ÿ”ง
  • --omit-clean-shutdown โ€” doesn't set the clean shutdown flag. lowkey sus, so only do it if you know why ๐Ÿ™ƒ

๐Ÿ“– EXAMPLE ๐Ÿ“–

okay so this one restores the XML formatted cache metadata in the file metadata onto the logical volume /dev/vg/metadata, so the respective device-mapper target can process it next โœจ

$ cache_restore -i metadata -o /dev/vg/metadata

๐Ÿฉบ DIAGNOSTICS ๐Ÿฉบ

cache_restore returns an exit code of 0 for success or 1 for error. so check that number if you're using --quiet ๐Ÿ’œ

๐Ÿ”— SEE ALSO ๐Ÿ”—

cache_dump(8), cache_check(8), cache_repair(8) ๐Ÿซถ

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Joe Thornber <ejt@redhat.com>, Heinz Mauelshagen <HeinzM@RedHat.com> ๐ŸŒŸ


that's the whole tea, bestie! ๐ŸŒˆ this page came from the Device Mapper Tools kit, and it's the cache_restore(8) page from the System Manager's Manual ๐Ÿ’…โœจ periodt ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from