1xfs_metadump(8)             System Manager's Manual            xfs_metadump(8)
2
3
4

NAME

6       xfs_metadump - copy XFS filesystem metadata to a file
7

SYNOPSIS

9       xfs_metadump  [  -aefFgow  ]  [ -m max_extents ] ] [ -l logdev ] source
10       target
11       xfs_metadump -V
12

DESCRIPTION

14       xfs_metadump is a debugging tool that copies the metadata from  an  XFS
15       filesystem  to a file.  The source argument must be the pathname of the
16       device or file containing the XFS filesystem and  the  target  argument
17       specifies  the  destination file name.  If target is -, then the output
18       is sent to stdout. This allows the output to be redirected  to  another
19       program such as a compression application.
20
21       xfs_metadump  may  only be used to copy unmounted filesystems, or read-
22       only mounted filesystems.
23
24       xfs_metadump does not alter the source filesystem in any way. The  tar‐
25       get image is a contiguous (non-sparse) file containing all the filesys‐
26       tem's metadata and indexes to where the blocks were copied from.
27
28       By default, xfs_metadump obfuscates most file (regular file,  directory
29       and  symbolic  link)  names  and  extended attribute names to allow the
30       dumps to be sent without revealing confidential  information.  Extended
31       attribute  values are zeroed and no data is copied. The only exceptions
32       are file or attribute names that are 4 or less  characters  in  length.
33       Also  file  names  that  span  extents  (this  can  only occur with the
34       mkfs.xfs(8) options where -n size > -b size) are not obfuscated.  Names
35       between  5  and 8 characters in length inclusively are partially obfus‐
36       cated.
37
38       xfs_metadump should not be used for any purposes other than for  debug‐
39       ging  and reporting filesystem problems. The most common usage scenario
40       for this tool is when xfs_repair(8) fails to repair a filesystem and  a
41       metadump image can be sent for analysis.
42
43       The  file generated by xfs_metadump can be restored to filesystem image
44       (minus the data) using the xfs_mdrestore(8) tool.
45

OPTIONS

47       -a     Copies entire metadata blocks.  Normally, xfs_metadump will zero
48              any  stale  bytes  interspersed  with in-use metadata.  Use this
49              option to copy full metadata blocks, to provide  more  debugging
50              information  for  a  corrupted  filesystem.  Note that the extra
51              data will be unobfuscated.
52
53       -e     Stops the dump on a read error. Normally, it  will  ignore  read
54              errors and copy all the metadata that is accessible.
55
56       -f     Specifies that the filesystem image to be processed is stored in
57              a regular file (see the mkfs.xfs -d file option). This can  also
58              happen  if  an  image copy of a filesystem has been made into an
59              ordinary file with xfs_copy(8).
60
61       -F     Specifies that we want to continue even if the superblock  magic
62              is  not  correct.  If the source is truly not an XFS filesystem,
63              the resulting image will be useless, and xfs_metadump may crash.
64
65       -g     Shows dump progress. This is sent to stdout if the target  is  a
66              file or to stderr if the target is stdout.
67
68       -l logdev
69              For  filesystems  which  use an external log, this specifies the
70              device where the external log resides. The external log  is  not
71              copied, only internal logs are copied.
72
73       -m     Set  the  maximum size of an allowed metadata extent.  Extremely
74              large metadata extents are likely to be  corrupt,  and  will  be
75              skipped  if they exceed this value.  The default size is 2097151
76              blocks.
77
78       -o     Disables obfuscation of file names and extended attributes.
79
80       -w     Prints warnings of inconsistent metadata encountered to  stderr.
81              Bad metadata is still copied.
82
83       -V     Prints the version number and exits.
84

DIAGNOSTICS

86       xfs_metadump returns an exit code of 0 if all readable metadata is suc‐
87       cessfully copied or 1 if a write error occurs or a  read  error  occurs
88       and the -e option used.
89

NOTES

91       As  xfs_metadump copies metadata only, it does not matter if the source
92       filesystem has a realtime section or not.  If  the  filesystem  has  an
93       external  log,  it is not copied. Internal logs are copied and any out‐
94       standing log transactions are not obfuscated if they contain names.
95
96       xfs_metadump is a shell wrapper around the xfs_db(8) metadump command.
97

SEE ALSO

99       xfs_repair(8), xfs_mdrestore(8), xfs_freeze(8), xfs_db(8), xfs_copy(8),
100       xfs(5)
101

BUGS

103       Email bug reports to linux-xfs@vger.kernel.org.
104
105
106
107                                                               xfs_metadump(8)
Impressum