Imported Upstream version 2.5.1
[debian/amanda] / man / amfetchdump.8
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "AMFETCHDUMP" 8 "" "" ""
21 .SH "NAME"
22 amfetchdump - extract backup images from multiple Amanda tapes.
23 .SH "SYNOPSIS"
24 .HP 12
25 \fBamfetchdump\fR [-pcClawns] [-d \fIdevice\fR] [-O \fIdirectory\fR] [-i \fIlogfile\fR] [-b \fIblocksize\fR] \fIconfig\fR \fIhostname\fR [\fIdisk\fR [ \fIdate\fR [ \fIlevel\fR [ \fIhostname\fR [...] ] ] ]] [-o \fIconfigoption\fR]*
26
27 .SH "DESCRIPTION"
28 .PP
29 \fBAmfetchdump\fR
30 pulls one or more matching dumps from tape or from the holding disk, handling the reassembly of multi-tape split dump files as well as any tape autochanger operations.
31 .PP
32 It will automatically use the logs created by
33 \fBamdump\fR(8)
34 to locate available dumps on tape, in the same way that the
35 \fBfind\fR
36 feature of
37 \fBamadmin\fR(8)
38 lists available dumps. If these logs are unavailable, it can search tape-by-tape to find what it needs, and can generate new logs to serve as an emergency tape inventory.
39 .PP
40 The
41 \fBhostname\fR,
42 \fBdiskname\fR,
43 \fBdatestamp\fR, and
44 \fBlevel\fR
45 dump pattern-matching works as in
46 \fBamrestore\fR(8), with the added requirement that at minimum a
47 \fBhostname\fR
48 must be specified when not in inventory mode.
49 .PP
50 Unless
51 \fB-p\fR
52 is used, backup images are extracted to files in the current directory named:
53 .PP
54 \fBhostname.diskname.datestamp.dumplevel\fR
55 .SH "OPTIONS"
56 .TP
57 \fB-p\fR
58 Pipe exactly one complete dump file to
59 \fBstdout\fR, instead of writing the file to disk. This will restore only the first matching dumpfile (where "first" is determined by the dump log search facility).
60 .TP
61 \fB-d\fR \fIdevice\fR
62 Restore from this tape device instead of the default.
63 .TP
64 \fB-O\fR \fIdirectory\fR
65 Output restored files to this directory, instead of to the current working directory.
66 .TP
67 \fB-c\fR
68 Compress output, fastest method available.
69 .TP
70 \fB-C\fR
71 Compress output, smallest file size method available.
72 .TP
73 \fB-l\fR
74 Leave dumps in the compressed/uncompressed state in which they were found on tape. By default,
75 \fBamfetchdump\fR
76 will automatically uncompress when restoring.
77 .TP
78 \fB-a\fR
79 Assume that all tapes are already available, via tape changer or otherwise, instead of prompting the operator to ensure that all tapes are loaded.
80 .TP
81 \fB-i\fR \fIfilename\fR
82 Generate an inventory of all dumps "seen" on the tapes we search, for later use as a log.
83 .TP
84 \fB-w\fR
85 Wait to put split dumps together until all chunks have been restored. Normally,
86 \fBamfetchdump\fR
87 will attempt to read pieces of a split file from tape in order, so that it can assemble them simply by appending each file to the first. This option disables the appending behavior, and instead restores each piece as an individual file and reassembles them only after all have been restored.
88 .sp
89 .it 1 an-trap
90 .nr an-no-space-flag 1
91 .nr an-break-flag 1
92 .br
93 \fBNote\fR
94 This requires at least double the size of your dump in free
95 disk space, in order to build the final assembled dumpfile.This behavior is implicitly invoked in circumstances where knowing the location of all dumps on tape in advance is not possible, such as when you are restoring without log files.
96 .TP
97 \fB-n\fR
98 Do not reassemble split dump files at all, just restore each piece as an individual file.
99 .TP
100 \fB-s\fR
101 Do not fast-forward straight to needed files on tape. This will slow down most restores substantially. Only use this option if your tape drive does not properly support the fast-forward operation.
102 .TP
103 \fB-b\fR \fIblocksize\fR
104 Force a particular block size when reading from tapes. This value will usually be autodetected, and should not normally need to be set.
105 .TP
106 \fB-o\fR \fIconfigoption\fR
107 See the "\fBCONFIGURATION OVERWRITE\fR" section in
108 \fBamanda\fR(8).
109 .SH "EXAMPLES"
110 .PP
111 All the examples here assume your configuration is called
112 \fISetA\fR.
113 .PP
114 Here's a simple case, restoring all known dumps of the host vanya to the current working directory.
115 .sp
116 .nf
117
118 $ amfetchdump SetA vanya
119
120 .fi
121 .sp
122 .PP
123 A more likely scenario involves restoring a particular dump from a particular date. We'll pipe this one to
124 \fBGNU-tar\fR
125 as well, to automatically extract the dump.
126 .sp
127 .nf
128
129 $ amfetchdump -p SetA vanya /home 20051020 | gtar -xvpf -
130
131 .fi
132 .sp
133 .PP
134 In a situation where all of our dump logs have been wiped out, we could also use amfetchdump to inventory our tapes and recreate an imitation of those logs, which we'll send to
135 \fBstdout\fR
136 for casual perusal.
137 .sp
138 .nf
139
140 $ amfetchdump -i - SetA
141
142 .fi
143 .sp
144
145 .PP
146 Note that you can specify a restore while in inventory mode, and
147 \fBamfetchdump\fR
148 will continue searching for more dumps from this host even after successfully restoring a dump, inventorying all the while. If your backup searcher has been trashed, this is a handy way to recover what you have.
149 .sp
150 .nf
151
152 $ amfetchdump -i /var/amanda/log SetA backupserver
153
154 .fi
155 .sp
156
157 .SH "CAVEATS"
158 \fBAmfetchdump\fR is dependent on accessing your server's config,
159 tape changer, and (normally) dump logs. As such, it's not necessarily
160 the most useful tool when those have all been wiped out and you
161 desperately need to pull things from your tape. Pains have been taken
162 to make it as capable as possible, but for seriously minimialist
163 restores, look to
164 \fBamrestore\fR(8)
165 or
166 \fBdd\fR(8)
167 instead.
168 .SH "AUTHOR"
169 .PP
170 John Stange,
171 <building@nap.edu>, National Academies Press
172 .PP
173 Ian Turner,
174 <ian@zmanda.com>: XML-conversion
175 .SH "SEE ALSO"
176 .PP
177 \fBamanda\fR(8),
178 \fBamadmin\fR(8),
179 \fBamrestore\fR(8),
180 \fBtar\fR(1)\fBrestore\fR(8)
181