xfs_metadump - copy XFS filesystem metadata to a file
is a debugging tool that copies the metadata from an XFS filesystem to a file.
argument must be the pathname of the device or file
containing the XFS filesystem and the
argument specifies the destination file name.
is -, then the output is sent to stdout. This allows the output to be
redirected to another program such as a compression application.
should only be used to copy unmounted filesystems, read-only mounted
filesystems, or frozen filesystems (see
Otherwise, the generated dump could be inconsistent or corrupt.
does not alter the source filesystem in any way. The
image is a contiguous (non-sparse) file containing all the
filesystem's metadata and indexes to where the blocks were copied from.
obfuscates most file (regular file, directory and symbolic link) names
and extended attribute names to allow the dumps to be sent without
revealing confidential information. Extended attribute values are zeroed
and no data is copied. The only exceptions are file or attribute names
that are 4 or less characters in length. Also file names that span extents
(this can only occur with the
are not obfuscated. Names between 5 and 8 characters in length inclusively
are partially obfuscated.
should not be used for any purposes other than for debugging and reporting
filesystem problems. The most common usage scenario for this tool is when
fails to repair a filesystem and a metadump image can be sent for
The file generated by
can be restored to filesystem image (minus the data) using the
Stops the dump on a read error. Normally, it will ignore read errors and copy
all the metadata that is accessible.
Specifies that the filesystem image to be processed is stored in a regular file
file option). This can also happen if an image copy of a filesystem has
been made into an ordinary file with
Shows dump progress. This is sent to stdout if the
is a file or to stderr if the
For filesystems which use an external log, this specifies the device where the
external log resides. The external log is not copied, only internal logs are
Disables obfuscation of file names and extended attributes.
Prints warnings of inconsistent metadata encountered to stderr. Bad metadata
is still copied.
returns an exit code of 0 if all readable metadata is successfully copied or
1 if a write error occurs or a read error occurs and the
copies metadata only, it does not matter if the
filesystem has a realtime section or not. If the filesystem has an external
log, it is not copied. Internal logs are copied and any outstanding log
transactions are not obfuscated if they contain names.
is a shell wrapper around the