File: xfs_metadump.8

package info (click to toggle)
xfsprogs 2.9.8-1lenny1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,512 kB
  • ctags: 9,344
  • sloc: ansic: 92,865; makefile: 765; sh: 639
file content (132 lines) | stat: -rw-r--r-- 3,603 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
.TH xfs_metadump 8
.SH NAME
xfs_metadump \- copy XFS filesystem metadata to a file
.SH SYNOPSIS
.B xfs_metadump
[
.B \-efgow
] [
.B \-l
.I logdev
]
.I source
.I target
.SH DESCRIPTION
.B xfs_metadump
is a debugging tool that copies the metadata from an XFS filesystem to a file.
The
.I source
argument must be the pathname of the device or file
containing the XFS filesystem and the
.I target
argument specifies the destination file name.
If
.I target
is \-, then the output is sent to stdout. This allows the output to be
redirected to another program such as a compression application.
.PP
.B xfs_metadump
should only be used to copy unmounted filesystems, read-only mounted
filesystems, or frozen filesystems (see
.BR xfs_freeze (8)).
Otherwise, the generated dump could be inconsistent or corrupt.
.PP
.B xfs_metadump
does not alter the source filesystem in any way. The
.I target
image is a contiguous (non-sparse) file containing all the
filesystem's metadata and indexes to where the blocks were copied from.
.PP
By default,
.B xfs_metadump
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
.BR mkfs.xfs (8)
options where
.B \-n
.I size
>
.B \-b
.IR size )
are not obfuscated. Names between 5 and 8 characters in length inclusively
are partially obfuscated.
.PP
.B xfs_metadump
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
.BR xfs_repair (8)
fails to repair a filesystem and a metadump image can be sent for
analysis.
.PP
The file generated by
.B xfs_metadump
can be restored to filesystem image (minus the data) using the
.BR xfs_mdrestore (8)
tool.
.PP
.SH OPTIONS
.TP
.B \-e
Stops the dump on a read error. Normally, it will ignore read errors and copy
all the metadata that is accessible.
.TP
.B \-f
Specifies that the filesystem image to be processed is stored in a regular file
(see the
.B mkfs.xfs -d
file option). This can also happen if an image copy of a filesystem has
been made into an ordinary file with
.BR xfs_copy (8).
.TP
.B \-g
Shows dump progress. This is sent to stdout if the
.I target
is a file or to stderr if the
.I target
is stdout.
.TP
.BI \-l " logdev"
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
copied.
.TP
.B \-o
Disables obfuscation of file names and extended attributes.
.TP
.B \-w
Prints warnings of inconsistant metadata encountered to stderr. Bad metadata
is still copied.
.SH DIAGNOSTICS
.B xfs_metadump
returns an exit code of 0 if all readable metadata is succesfully copied or
1 if a write error occurs or a read error occurs and the
.B \-e
option used.
.SH NOTES
As
.B xfs_metadump
copies metadata only, it does not matter if the
.I source
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.
.PP
.B xfs_metadump
is a shell wrapper around the
.BR xfs_db (8)
.B metadump
command.
.SH SEE ALSO
.BR xfs_repair (8),
.BR xfs_mdrestore (8),
.BR xfs_freeze (8),
.BR xfs_db (8),
.BR xfs_copy (8),
.BR xfs (5)
.SH BUGS
Email bug reports to
.BR xfs@oss.sgi.com .