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>
18 <refname>amrestore</refname>
19 <refpurpose>extract backup images from an &A; tape</refpurpose>
21 <!-- body begins here -->
24 <command>amrestore</command>
25 <group choice='opt'><arg choice='plain'>-r </arg>
26 <arg choice='plain'>-c </arg>
27 <arg choice='plain'>-C </arg>
29 <arg choice='opt'><arg choice='plain'>-b </arg> <arg choice='plain'><replaceable>blocksize</replaceable></arg> </arg>
30 <arg choice='opt'><arg choice='plain'>-f </arg><arg choice='plain'><replaceable>fileno</replaceable></arg></arg>
31 <arg choice='opt'><arg choice='plain'>-l </arg><arg choice='plain'><replaceable>label</replaceable></arg></arg>
32 <arg choice='opt'>-p </arg>
33 <arg choice='opt'>-h </arg>
34 <group choice='plain'>
35 <arg choice='plain'><replaceable>tapedevice</replaceable></arg>
36 <arg choice='plain'><replaceable>holdingfile</replaceable></arg>
37 <arg choice='opt'><arg choice='plain'><replaceable>hostname</replaceable></arg>
38 <arg choice='opt'><arg choice='plain'><replaceable>diskname</replaceable></arg>
39 <arg choice='opt'><replaceable>datestamp</replaceable></arg> </arg></arg> ...
45 <refsect1><title>DESCRIPTION</title>
46 <para><emphasis remap='B'>Amrestore</emphasis>
47 extracts backup images from the tape mounted on
48 <emphasis remap='I'>tapedevice</emphasis>
49 or from the holding disk file
50 <emphasis remap='I'>holdingfile</emphasis>
52 <emphasis remap='I'>hostname</emphasis>,
53 <emphasis remap='I'>diskname</emphasis>
55 <emphasis remap='I'>datestamp</emphasis>
56 patterns given on the command line.
57 The tape or holding file must be in a format written by the
58 <emphasis remap='B'>amdump</emphasis>
60 <emphasis remap='B'>amflush</emphasis>
64 <emphasis remap='I'>diskname</emphasis>
65 is not specified, all backups on the tape for the previous
66 <emphasis remap='I'>hostname</emphasis>
69 <emphasis remap='I'>datestamp</emphasis>
70 is not specified, all backups on the tape for the previous
71 <emphasis remap='I'>hostname</emphasis>
73 <emphasis remap='I'>diskname</emphasis>
76 <emphasis remap='I'>hostname</emphasis>,
77 <emphasis remap='I'>diskname</emphasis>
79 <emphasis remap='I'>datestamp</emphasis>
80 are specified, every backup on the tape is a candidate.</para>
82 <para><emphasis remap='I'>Hostname</emphasis>
84 <emphasis remap='I'>diskname</emphasis>
85 are special expressions described in the "HOST & DISK EXPRESSION" section
87 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
88 <emphasis remap='I'>Datestamp</emphasis>
89 are special expression described in the "DATESTAMP EXPRESSION" section
91 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
93 <emphasis remap='I'>diskname</emphasis>
94 is "rz[23]a", it would match disks
95 <emphasis remap='B'>rz2a</emphasis>
97 <emphasis remap='B'>rz3a</emphasis>.</para>
99 <para><emphasis remap='I'>Datestamp</emphasis>
101 <emphasis remap='B'>amflush</emphasis>
102 writes multiple backup runs to a single tape.</para>
107 candidate backup images are extracted to files
108 in the current directory named:</para>
111 <para><emphasis remap='I'>hostname.diskname.datestamp.dumplevel</emphasis></para>
114 <para>Amrestore doesn't use a changer, it restore from the tape already loaded
116 <emphasis remap='I'>tapedevice.</emphasis></para>
119 <refsect1><title>OPTIONS</title>
120 <variablelist remap='TP'>
122 <term><option>-b</option></term>
124 <para>Set the blocksize used to read the tape or holding file.
125 All holding files must be read with a blocksize of 32 KBytes.
126 <emphasis remap='B'>Amrestore</emphasis>
127 should normally be able to determine the blocksize for tapes
128 on its own and not need this parameter.</para>
133 <para>The default is 32 KBytes.</para>
134 <variablelist remap='TP'>
136 <term><option>-f</option></term>
138 <para>Do a rewind followed by a fsf <fileno> before trying to restore an image.</para>
142 <term><option>-l</option></term>
144 <para>Check if we restoring from the tape with the right
145 <emphasis remap='I'>label</emphasis></para>
149 <term><option>-p</option></term>
152 The first matching backup image is sent to standard output,
153 which is normally a pipe to
154 <emphasis remap='B'>restore</emphasis>
156 <emphasis remap='B'>tar</emphasis>,
158 <command>amrestore</command>
160 It may be run again to continue selecting backups to process.
161 Make sure you specify the no-rewind
162 <emphasis remap='I'>tapedevice</emphasis>
163 when doing this.</para>
169 <emphasis remap='B'>restore</emphasis>
170 may report "short read" errors when reading from a pipe.
172 <emphasis remap='B'>restore</emphasis>
173 support a blocking factor option to let you set the read block size,
174 and you should set it to 2.
175 See the example below.</para>
176 <variablelist remap='TP'>
178 <term><option>-c</option></term>
180 <para>Compress output using the fastest method the compression program provides.
181 <emphasis remap='B'>Amrestore</emphasis>
182 normally writes output files in a format understood by
183 <emphasis remap='B'>restore</emphasis>
185 <emphasis remap='B'>tar</emphasis>,
186 even if the backups on the tape are compressed.
192 <command>amrestore</command>
193 writes all files in compressed format,
194 even if the backups on the tape are not compressed.
195 Output file names will have a
199 extension depending on whether
200 <emphasis remap='B'>compress</emphasis>
202 <emphasis remap='B'>gzip</emphasis>
203 is the preferred compression program.
204 This option is useful when the current directory disk is small.</para>
208 <term><option>-C</option></term>
210 <para>Compress output using the best method the compression program provides
211 (may be very CPU intensive).
212 See the notes above about the
218 <term><option>-r</option></term>
221 Backup images are output exactly as they are on the tape,
223 <emphasis remap='B'>amdump</emphasis>
225 Output file names will have a
226 <markup>.RAW</markup>
228 This option is only useful for debugging and other strange circumstances.</para>
232 <term><option>-h</option></term>
235 The tape header block is output at the beginning of each file.
242 may also be used to compress the result.
243 <emphasis remap='B'>Amrecover</emphasis>
244 uses the header to determine the restore program to use.</para>
249 <para>If a header is written (-r or -h),
250 only 32 KBytes are output regardless of the tape blocksize.
251 This makes the resulting image usable as a holding file.</para>
254 <refsect1><title>EXAMPLES</title>
255 <para>The following does an interactive restore of disk
256 <emphasis remap='I'>rz3g</emphasis>
258 <emphasis remap='I'>seine</emphasis>,
259 to restore particular files.
261 <emphasis remap='B'>b</emphasis>
263 <emphasis remap='B'>restore</emphasis>,
264 which causes it to read in units of two 512-byte blocks (1 Kbyte)
266 This helps keep it from complaining about short reads.</para>
269 <literallayout remap='.nf'>
270 % amrestore -p /dev/nrmt9 seine rz3g | restore -ivbf 2 -
271 </literallayout> <!-- .fi -->
273 <para>The next example extracts all backup images for host
274 <emphasis remap='I'>seine</emphasis>.
275 This is the usual way to extract all data for a host after a disk crash.</para>
278 <literallayout remap='.nf'>
279 % amrestore /dev/nrmt9 seine
280 </literallayout> <!-- .fi -->
282 <para>If the backup datestamp in the above example is
283 <literal>19910125</literal>
285 <emphasis remap='I'>seine</emphasis>
286 has level 0 backups of disks
287 <emphasis remap='I'>rz1a</emphasis>
289 <emphasis remap='I'>rz1g</emphasis>
291 these files will be created in the current directory:</para>
294 <literallayout remap='.nf'>
295 seine.rz1a.19910125.0
296 seine.rz1g.19910125.0
297 </literallayout> <!-- .fi -->
299 <para>You may also use
300 <command>amrestore</command>
301 to extract a backup image from a holding disk
302 file that has not yet been flushed to tape:</para>
305 <literallayout remap='.nf'>
306 % amrestore -p /amanda/20001119/seine.rz1a.2 | restore -ivbf 2 -
307 </literallayout> <!-- .fi -->
309 <para><emphasis remap='B'>Amrestore</emphasis>
310 may be used to generate a listing of images on a tape:</para>
313 <literallayout remap='.nf'>
314 % mt -f /dev/nrmt9 rewind
315 % amrestore -p /dev/nrmt9 no-such-host > /dev/null
316 </literallayout> <!-- .fi -->
319 <command>amrestore</command>
320 to find images for host
321 <emphasis remap='B'>no-such-host</emphasis>.
322 It will not find any entries that match, but along the way will report
323 each image it skips.</para>
326 <refsect1><title>CAVEATS</title>
327 <para>&gnutar; must be used to restore files from backup images created with
329 Vendor tar programs sometimes fail to read GNU tar images.</para>
332 <refsect1><title>AUTHOR</title>
333 <para>James da Silva, &email.jds;, University of Maryland,
334 College Park: Original text</para>
335 <para>&maintainer.sgw;: XML-conversion</para>
338 <refsect1><title>SEE ALSO</title>
339 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
340 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
341 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
342 <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>
343 <citerefentry><refentrytitle>restore</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>