xfs_mdrestore(8)

πŸ“¦
version 7.2.1 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay so this is xfs_mdrestore(8) from the System Manager's Manual πŸ’… and it's the tool that restores an XFS metadump image to a filesystem image 🧚

πŸŽ€ SYNOPSIS πŸŽ€

xfs_mdrestore [ -gi ] [ -l logdev ] [ -r rtdev ] source target
xfs_mdrestore -i [ -l logdev ] [ -r rtdev ] source
xfs_mdrestore -V

πŸ’– DESCRIPTION πŸ’–

okay bestie, so xfs_mdrestore is a debugging tool πŸ” that takes a metadata image made by xfs_metadump(8) and puts it back into a filesystem. the source argument is where the metadump image lives, and the target argument is where the filesystem image is headed πŸ¦‹

if the source is -, the metadata image gets read from stdin instead. this is so lowkey useful because you can pipe the output of another program, like a compression app, straight into xfs_mdrestore ✨ the target can be a file or a device, either one works 🫢

😭 ngl this one is a big ol' warning: do NOT use xfs_mdrestore to restore metadata onto an existing filesystem unless you are 100% certain the target can be destroyed. like, full stop. don't be that girl πŸ’€

🌸 OPTIONS 🌸

  • -g β€” shows the restore progress on stdout πŸ“ˆ
  • -i β€” shows the metadump information on stdout 🧾 if you don't give it a target, it exits right after showing the info. older metadumps may not include any descriptive info tho πŸ™ˆ
  • -l logdev β€” metadump v2 format can hold metadata dumped from an external log πŸͺ΅ in that case you have to give a device where the log device contents from the metadump file get copied to πŸ’…
  • -r rtdev β€” restores the realtime device metadata onto this device 🌈 this is only required for a metadump in v2 format, so don't stress it otherwise πŸ’œ
  • -V β€” prints the version number and exits πŸ”₯

πŸ‘‘ DIAGNOSTICS πŸ‘‘

xfs_mdrestore returns an exit code of 0 if all the metadata is successfully restored, or 1 if an error occurs ⭐ so check that exit code, periodt πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

xfs_metadump(8), xfs_repair(8), xfs(5) β€” the squad you'll want to read next 🫢

πŸ› BUGS πŸ›

bug reports go to linux-xfs@vger.kernel.org πŸ“¬ iykyk πŸ“


thanks for hanging with me bestie 🫢 xfs_mdrestore(8) πŸ’– slay the filesystem responsibly ✨

πŸ“¦ where this page comes from