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"
5 <!-- entities files to use -->
6 <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amrestore.8'>
14 <refentrytitle>amrestore</refentrytitle>
15 <manvolnum>8</manvolnum>
21 <refname>amrestore</refname>
22 <refpurpose>extract backup images from an &A; tape</refpurpose>
28 <!-- body begins here -->
31 <command>amrestore</command>
32 <group choice='opt'><arg choice='plain'>-r </arg><arg choice='plain'>-c </arg><arg choice='plain'>-C </arg></group>
33 <group><arg choice='plain'>-b</arg><arg choice='plain'><replaceable>blocksize</replaceable></arg></group>
34 <group><arg choice='plain'>-f</arg><arg choice='plain'><replaceable>fileno</replaceable></arg></group>
35 <group><arg choice='plain'>-l </arg><arg choice='plain'><replaceable>label</replaceable></arg></group>
36 <arg choice='opt'>-p</arg>
37 <arg choice='opt'>-h</arg>
38 <arg choice='plain'><arg choice='plain'><replaceable>tapedevice</replaceable></arg>|<arg choice='plain'><replaceable>holdingfile</replaceable></arg></arg>
39 <group><arg choice='plain'><replaceable>hostname</replaceable></arg><group><arg choice='plain'><replaceable>diskname</replaceable></arg><group><arg choice='plain'><replaceable>datestamp</replaceable></arg><group><arg choice='plain'><replaceable>hostname</replaceable></arg><group><arg choice='plain'><replaceable>diskname</replaceable></arg><group><arg choice='plain'><replaceable>datestamp</replaceable></arg><arg choice='plain'>...</arg></group></group></group></group></group></group>
44 <refsect1><title>DESCRIPTION</title>
45 <para><emphasis remap='B'>Amrestore</emphasis>
46 extracts backup images from the tape mounted on
47 <emphasis remap='I'>tapedevice</emphasis>
48 or from the holding disk file
49 <emphasis remap='I'>holdingfile</emphasis>
51 <emphasis remap='I'>hostname</emphasis>,
52 <emphasis remap='I'>diskname</emphasis>
54 <emphasis remap='I'>datestamp</emphasis>
55 patterns given on the command line.
56 The tape or holding file must be in a format written by the
57 <emphasis remap='B'>amdump</emphasis>
59 <emphasis remap='B'>amflush</emphasis>
63 <emphasis remap='I'>diskname</emphasis>
64 is not specified, all backups on the tape for the previous
65 <emphasis remap='I'>hostname</emphasis>
68 <emphasis remap='I'>datestamp</emphasis>
69 is not specified, all backups on the tape for the previous
70 <emphasis remap='I'>hostname</emphasis>
72 <emphasis remap='I'>diskname</emphasis>
75 <emphasis remap='I'>hostname</emphasis>,
76 <emphasis remap='I'>diskname</emphasis>
78 <emphasis remap='I'>datestamp</emphasis>
79 are specified, every backup on the tape is a candidate.</para>
81 <para><emphasis remap='I'>Hostname</emphasis>
83 <emphasis remap='I'>diskname</emphasis>
84 are special expressions described in the "HOST & DISK EXPRESSION" section
86 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
87 <emphasis remap='I'>Datestamp</emphasis>
88 are special expression described in the "DATESTAMP EXPRESSION" section
90 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
92 <emphasis remap='I'>diskname</emphasis>
93 is "rz[23]a", it would match disks
94 <emphasis remap='B'>rz2a</emphasis>
96 <emphasis remap='B'>rz3a</emphasis>.</para>
98 <para><emphasis remap='I'>Datestamp</emphasis>
100 <emphasis remap='B'>amflush</emphasis>
101 writes multiple backup runs to a single tape.</para>
106 candidate backup images are extracted to files
107 in the current directory named:</para>
110 <para><emphasis remap='I'>hostname.diskname.datestamp.dumplevel</emphasis></para>
113 <para>Amrestore doesn't use a changer, it restore from the tape already loaded
115 <emphasis remap='I'>tapedevice.</emphasis></para>
118 <refsect1><title>OPTIONS</title>
119 <variablelist remap='TP'>
121 <term><option>-b</option></term>
123 <para>Set the blocksize used to read the tape or holding file.
124 All holding files must be read with a blocksize of 32 KBytes.
125 <emphasis remap='B'>Amrestore</emphasis>
126 should normally be able to determine the blocksize for tapes
127 on its own and not need this parameter.</para>
132 <para>The default is 32 KBytes.</para>
133 <variablelist remap='TP'>
135 <term><option>-f</option></term>
137 <para>Do a rewind followed by a fsf <fileno> before trying to restore an image.</para>
141 <term><option>-l</option></term>
143 <para>Check if we restoring from the tape with the right
144 <emphasis remap='I'>label</emphasis></para>
148 <term><option>-p</option></term>
151 The first matching backup image is sent to standard output,
152 which is normally a pipe to
153 <emphasis remap='B'>restore</emphasis>
155 <emphasis remap='B'>tar</emphasis>,
157 <command>amrestore</command>
159 It may be run again to continue selecting backups to process.
160 Make sure you specify the no-rewind
161 <emphasis remap='I'>tapedevice</emphasis>
162 when doing this.</para>
168 <emphasis remap='B'>restore</emphasis>
169 may report "short read" errors when reading from a pipe.
171 <emphasis remap='B'>restore</emphasis>
172 support a blocking factor option to let you set the read block size,
173 and you should set it to 2.
174 See the example below.</para>
175 <variablelist remap='TP'>
177 <term><option>-c</option></term>
179 <para>Compress output using the fastest method the compression program provides.
180 <emphasis remap='B'>Amrestore</emphasis>
181 normally writes output files in a format understood by
182 <emphasis remap='B'>restore</emphasis>
184 <emphasis remap='B'>tar</emphasis>,
185 even if the backups on the tape are compressed.
191 <command>amrestore</command>
192 writes all files in compressed format,
193 even if the backups on the tape are not compressed.
194 Output file names will have a
198 extension depending on whether
199 <emphasis remap='B'>compress</emphasis>
201 <emphasis remap='B'>gzip</emphasis>
202 is the preferred compression program.
203 This option is useful when the current directory disk is small.</para>
207 <term><option>-C</option></term>
209 <para>Compress output using the best method the compression program provides
210 (may be very CPU intensive).
211 See the notes above about the
217 <term><option>-r</option></term>
220 Backup images are output exactly as they are on the tape,
222 <emphasis remap='B'>amdump</emphasis>
224 Output file names will have a
225 <markup>.RAW</markup>
227 This option is only useful for debugging and other strange circumstances.</para>
231 <term><option>-h</option></term>
234 The tape header block is output at the beginning of each file.
241 may also be used to compress the result.
242 <emphasis remap='B'>Amrecover</emphasis>
243 uses the header to determine the restore program to use.</para>
248 <para>If a header is written (-r or -h),
249 only 32 KBytes are output regardless of the tape blocksize.
250 This makes the resulting image usable as a holding file.</para>
252 <variablelist remap='TP'>
254 <term><emphasis remap='B'>-o</emphasis> <replaceable>configoption</replaceable></term>
256 <para>See the "<emphasis remap='B'>CONFIGURATION OVERRIDE</emphasis>" section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
263 <refsect1><title>EXAMPLES</title>
264 <para>The following does an interactive restore of disk
265 <emphasis remap='I'>rz3g</emphasis>
267 <emphasis remap='I'>seine</emphasis>,
268 to restore particular files.
270 <emphasis remap='B'>b</emphasis>
272 <emphasis remap='B'>restore</emphasis>,
273 which causes it to read in units of two 512-byte blocks (1 Kbyte)
275 This helps keep it from complaining about short reads.</para>
278 <literallayout remap='.nf'>
279 % amrestore -p /dev/nrmt9 seine rz3g | restore -ivbf 2 -
280 </literallayout> <!-- .fi -->
282 <para>The next example extracts all backup images for host
283 <emphasis remap='I'>seine</emphasis>.
284 This is the usual way to extract all data for a host after a disk crash.</para>
287 <literallayout remap='.nf'>
288 % amrestore /dev/nrmt9 seine
289 </literallayout> <!-- .fi -->
291 <para>If the backup datestamp in the above example is
292 <literal>19910125</literal>
294 <emphasis remap='I'>seine</emphasis>
295 has level 0 backups of disks
296 <emphasis remap='I'>rz1a</emphasis>
298 <emphasis remap='I'>rz1g</emphasis>
300 these files will be created in the current directory:</para>
303 <literallayout remap='.nf'>
304 seine.rz1a.19910125.0
305 seine.rz1g.19910125.0
306 </literallayout> <!-- .fi -->
308 <para>You may also use
309 <command>amrestore</command>
310 to extract a backup image from a holding disk
311 file that has not yet been flushed to tape:</para>
314 <literallayout remap='.nf'>
315 % amrestore -p /amanda/20001119/seine.rz1a.2 | restore -ivbf 2 -
316 </literallayout> <!-- .fi -->
318 <para><emphasis remap='B'>Amrestore</emphasis>
319 may be used to generate a listing of images on a tape:</para>
322 <literallayout remap='.nf'>
323 % mt -f /dev/nrmt9 rewind
324 % amrestore -p /dev/nrmt9 no-such-host > /dev/null
325 </literallayout> <!-- .fi -->
328 <command>amrestore</command>
329 to find images for host
330 <emphasis remap='B'>no-such-host</emphasis>.
331 It will not find any entries that match, but along the way will report
332 each image it skips.</para>
335 <refsect1><title>CAVEATS</title>
336 <para>&gnutar; must be used to restore files from backup images created with
338 Vendor tar programs sometimes fail to read GNU tar images.</para>
341 <refsect1><title>SEE ALSO</title>
342 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
343 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
344 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
345 <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
346 <citerefentry><refentrytitle>restore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
347 <ulink url="http://wiki.zmanda.com"/>