xfs\_mdrestore(8) System Manager's Manual xfs\_mdrestore(8)

# [NAME](#NAME)

xfs\_mdrestore - restores an XFS metadump image to a filesystem image

# [SYNOPSIS](#SYNOPSIS)

**xfs\_mdrestore** \[ **-gi** ] \[ **-l** *logdev* ] \[ **-r** *rtdev* ] *source* *target*  
**xfs\_mdrestore** **-i** \[ **-l** *logdev* ] \[ **-r** *rtdev* ] *source*  
**xfs\_mdrestore -V**

# [DESCRIPTION](#DESCRIPTION)

**xfs\_mdrestore** is a debugging tool that restores a metadata image generated by [**xfs\_metadump**(8)](/man/os/xfsprogs/xfs_metadump.8) to a filesystem. The *source* argument specifies the location of the metadump image and the *target* argument specifies the destination for the filesystem image. If the *source* is -, then the metadata image is read from stdin. This allows the output of be another program such as a compression application to be redirected to **xfs\_mdrestore**. The *target* can be either a file or a device.

**xfs\_mdrestore** should not be used to restore metadata onto an existing filesystem unless you are completely certain the *target* can be destroyed.

# [OPTIONS](#OPTIONS)

[**-g**](#g)

Shows restore progress on stdout.

[**-i**](#i)

Shows metadump information on stdout. If no *target* is specified, exits after displaying information. Older metadumps man not include any descriptive information.

[**-l logdev**](#l)

Metadump in v2 format can contain metadata dumped from an external log. In such a scenario, the user has to provide a device to which the log device contents from the metadump file are copied.

[**-r rtdev**](#r)

Restore realtime device metadata to this device. This is only required for a metadump in v2 format.

[**-V**](#V)

Prints the version number and exits.

# [DIAGNOSTICS](#DIAGNOSTICS)

**xfs\_mdrestore** returns an exit code of 0 if all the metadata is successfully restored or 1 if an error occurs.

# [SEE ALSO](#SEE_ALSO)

[**xfs\_metadump**(8)](/man/os/xfsprogs/xfs_metadump.8), [**xfs\_repair**(8)](/man/os/xfsprogs/xfs_repair.8), [**xfs**(5)](/man/os/xfsprogs/xfs.5)

# [BUGS](#BUGS)

Email bug reports to **linux-xfs@vger.kernel.org**.

---

Document: xfs_mdrestore(8) from xfsprogs 7.2.1-r0 (Chainguard OS)
Source: https://kernel.googlesource.com/pub/scm/fs/xfs/xfsprogs-dev
