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