4f4d4a3878679c7f74491d2dc1239d7b37cc1520
[debian/amanda] / man / xml-source / amfetchdump.8.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7   %global_entities;
8 ]>
9
10 <refentry id='amfetchdump.8'>
11
12 <refmeta>
13 <refentrytitle>amfetchdump</refentrytitle>
14 <manvolnum>8</manvolnum>
15 </refmeta>
16 <refnamediv>
17 <refname>amfetchdump</refname>
18 <refpurpose>extract backup images from multiple &A; tapes.</refpurpose>
19 </refnamediv>
20 <!-- body begins here -->
21 <refsynopsisdiv>
22 <cmdsynopsis>
23   <command>amfetchdump</command>
24     <arg choice='opt'>-pcClawns</arg>
25     <arg choice='opt'>-d <replaceable>device</replaceable></arg>
26     <arg choice='opt'>-O <replaceable>directory</replaceable></arg>
27     <arg choice='opt'>-i <replaceable>logfile</replaceable></arg>
28     <arg choice='opt'>-b <replaceable>blocksize</replaceable></arg>
29     <arg choice='plain'><replaceable>config</replaceable></arg>
30     <arg choice='plain'><replaceable>hostname</replaceable></arg>
31     <arg choice='opt'>
32       <arg choice='plain'><replaceable>disk</replaceable></arg>
33       <arg choice='opt'>
34         <arg choice='plain'><replaceable>date</replaceable></arg>
35         <arg choice='opt'>
36           <arg choice='plain'><replaceable>level</replaceable></arg>
37           <arg choice='opt'>
38             <arg choice='plain'><replaceable>hostname</replaceable></arg>
39             <arg choice='opt'>...</arg>
40           </arg>
41         </arg>
42       </arg>
43     </arg>
44     <arg choice='plain' rep='repeat'><group><arg choice='plain'>-o </arg><replaceable>configoption</replaceable></group></arg>
45 </cmdsynopsis>
46 </refsynopsisdiv>
47
48
49 <refsect1><title>DESCRIPTION</title>
50 <para><emphasis remap='B'>Amfetchdump</emphasis>
51 pulls one or more matching dumps from tape or from the holding disk,
52 handling the reassembly of multi-tape split dump files as well as any
53 tape autochanger operations.</para>
54
55 <para>It will automatically use the logs created by
56 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>
57 to locate available dumps on tape, in the same way that the <emphasis
58 remap='B'>find</emphasis> feature of
59 <citerefentry><refentrytitle>amadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry>
60 lists available dumps. If these logs are unavailable, it can search
61 tape-by-tape to find what it needs, and can generate new logs to serve
62 as an emergency tape inventory.</para>
63
64 <para>The 
65 <emphasis remap='I'>hostname</emphasis>,
66 <emphasis remap='I'>diskname</emphasis>,
67 <emphasis remap='I'>datestamp</emphasis>,
68 and
69 <emphasis remap='I'>level</emphasis> dump pattern-matching works as in
70 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
71 with the added requirement that at minimum a <emphasis
72 remap='I'>hostname</emphasis> must be specified when not in inventory mode.</para>
73
74 <para>Unless
75 <option>-p</option>
76 is used, backup images are extracted to files in the current directory named:</para>
77
78 <!-- .RS -->
79 <para><emphasis remap='I'>hostname.diskname.datestamp.dumplevel</emphasis></para>
80 <!-- .RE -->
81 </refsect1>
82
83 <refsect1><title>OPTIONS</title>
84 <variablelist remap='TP'>
85   <varlistentry>
86     <term><option>-p</option></term>
87 <listitem><para>Pipe exactly one complete dump file to <emphasis
88 remap='I'>stdout</emphasis>, instead of writing the file to disk. This
89 will restore only the first matching dumpfile (where
90 &quot;first&quot; is determined by the dump log search
91 facility).</para></listitem>
92   </varlistentry>
93   <varlistentry>
94     <term><option>-d</option> <replaceable>device</replaceable></term>
95 <listitem><para> Restore from this tape device instead of the default.</para></listitem>
96   </varlistentry>
97   <varlistentry>
98     <term><option>-O</option>
99     <replaceable>directory</replaceable></term>
100 <listitem><para>Output restored files to this directory, instead of to the
101     current working directory.</para></listitem>
102   </varlistentry>
103   <varlistentry>
104     <term><option>-c</option></term>
105     <listitem><para>Compress output, fastest method
106     available.</para></listitem>
107   </varlistentry>
108   <varlistentry>
109     <term><option>-C</option></term>
110     <listitem><para>Compress output, smallest file size method
111     available.</para></listitem>
112   </varlistentry>
113   <varlistentry>
114     <term><option>-l</option></term>
115 <listitem><para>Leave dumps in the compressed/uncompressed state in which they
116 were found on tape. By default, <emphasis
117 remap='B'>amfetchdump</emphasis> will automatically uncompress when
118 restoring.</para></listitem>
119   </varlistentry>
120   <varlistentry>
121     <term><option>-a</option></term>
122 <listitem><para>Assume that all tapes are already available, via tape changer or
123 otherwise, instead of prompting the operator to ensure that all tapes
124 are loaded.</para></listitem>
125   </varlistentry>
126   <varlistentry>
127     <term><option>-i</option> <replaceable>filename</replaceable></term>
128 <listitem><para>Generate an inventory of all dumps &quot;seen&quot; on the
129 tapes we search, for later use as a log.</para></listitem>
130   </varlistentry>
131   <varlistentry>
132     <term><option>-w</option></term>
133 <listitem><para>Wait to put split dumps together until all chunks have been
134 restored. Normally, <emphasis remap='B'>amfetchdump</emphasis> will
135 attempt to read pieces of a split file from tape in order, so that it
136 can assemble them simply by appending each file to the first. This
137 option disables the appending behavior, and instead restores each
138 piece as an individual file and reassembles them only after all have
139 been restored.</para>
140
141 <note><para>This requires at least double the size of your dump in free
142 disk space, in order to build the final assembled dumpfile.</para>
143 </note>
144
145 <para>This behavior is implicitly invoked in circumstances where knowing the
146 location of all dumps on tape in advance is not possible, such as when
147 you are restoring without log files.</para></listitem>
148   </varlistentry>
149   <varlistentry>
150     <term><option>-n</option></term>
151 <listitem><para>Do not reassemble split dump files at all, just restore each
152 piece as an individual file.</para></listitem>
153   </varlistentry>
154   <varlistentry>
155     <term><option>-s</option></term>
156 <listitem><para>Do not fast-forward straight to needed files on tape. This will
157 slow down most restores substantially. Only use this option if your
158 tape drive does not properly support the fast-forward
159 operation.</para></listitem>
160   </varlistentry>
161   <varlistentry>
162     <term><option>-b</option>
163     <replaceable>blocksize</replaceable></term>
164 <listitem><para>Force a particular block size when reading from tapes. This
165     value will usually be autodetected, and should not normally need
166     to be set.</para></listitem>
167   </varlistentry>
168
169   <varlistentry>
170   <term><emphasis remap='B'>-o</emphasis> <replaceable>configoption</replaceable></term>
171   <listitem>
172 <para>See the "<emphasis remap='B'>CONFIGURATION OVERWRITE</emphasis>"
173  section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
174   </listitem>
175   </varlistentry>
176
177 </variablelist>
178 </refsect1>
179
180 <refsect1><title>EXAMPLES</title>
181 <para>All the examples here assume your configuration is called
182 <replaceable>SetA</replaceable>.</para>
183
184 <para>Here's a simple case, restoring all known dumps of the host
185 vanya to the current working directory.</para>
186 <!-- .RS -->
187 <literallayout remap='.nf'>
188 $ amfetchdump SetA vanya
189 </literallayout> <!-- .fi -->
190
191 <para>A more likely scenario involves restoring a particular dump from
192 a particular date. We'll pipe this one to &gnutar; as well, to
193 automatically extract the dump.</para>
194 <!-- .RS -->
195 <literallayout remap='.nf'>
196 $ amfetchdump -p SetA vanya /home 20051020 | gtar -xvpf -
197 </literallayout> <!-- .fi -->
198
199 <para>In a situation where all of our dump logs have been wiped out,
200 we could also use amfetchdump to inventory our tapes and recreate an
201 imitation of those logs, which we'll send to <emphasis
202 remap="I">stdout</emphasis> for casual perusal.
203 <!-- .RS -->
204 <literallayout remap='.nf'>
205 $ amfetchdump -i - SetA
206 </literallayout> <!-- .fi -->
207 </para>
208
209 <para>Note that you can specify a restore while in inventory mode, and
210 <command>amfetchdump</command> will continue searching for more dumps
211 from this host even after successfully restoring a dump, inventorying
212 all the while. If your backup searcher has been trashed, this is a
213 handy way to recover what you have.
214 <!-- .RS -->
215 <literallayout remap='.nf'>
216 $ amfetchdump -i /var/amanda/log SetA backupserver
217 </literallayout> <!-- .fi -->
218 </para>
219 </refsect1>
220
221 <refsect1><title>CAVEATS</title>
222 <para><command>Amfetchdump</command> is dependent on accessing your server's config,
223 tape changer, and (normally) dump logs. As such, it's not necessarily
224 the most useful tool when those have all been wiped out and you
225 desperately need to pull things from your tape. Pains have been taken
226 to make it as capable as possible, but for seriously minimialist
227 restores, look to
228 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>
229 or
230 <citerefentry><refentrytitle>dd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
231 instead.</para>
232 </refsect1>
233
234 <refsect1><title>AUTHOR</title>
235 <para>John Stange, &email.jstange;, National Academies Press</para>
236 <para>Ian Turner, &email.itt;: XML-conversion</para>
237 </refsect1>
238
239 <refsect1><title>SEE ALSO</title>
240 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
241 <citerefentry><refentrytitle>amadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
242 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
243 <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>
244 <citerefentry><refentrytitle>restore</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
245 </refsect1>
246 </refentry>
247