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><arg choice='plain'>-c </arg><arg choice='plain'>-C </arg></group>
26 <group><arg choice='plain'>-b</arg><arg choice='plain'><replaceable>blocksize</replaceable></arg></group>
27 <group><arg choice='plain'>-f</arg><arg choice='plain'><replaceable>fileno</replaceable></arg></group>
28 <group><arg choice='plain'>-l </arg><arg choice='plain'><replaceable>label</replaceable></arg></group>
29 <arg choice='opt'>-p</arg>
30 <arg choice='opt'>-h</arg>
31 <arg choice='plain'><arg choice='plain'><replaceable>tapedevice</replaceable></arg>|<arg choice='plain'><replaceable>holdingfile</replaceable></arg></arg>
32 <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>
37 <refsect1><title>DESCRIPTION</title>
38 <para><emphasis remap='B'>Amrestore</emphasis>
39 extracts backup images from the tape mounted on
40 <emphasis remap='I'>tapedevice</emphasis>
41 or from the holding disk file
42 <emphasis remap='I'>holdingfile</emphasis>
44 <emphasis remap='I'>hostname</emphasis>,
45 <emphasis remap='I'>diskname</emphasis>
47 <emphasis remap='I'>datestamp</emphasis>
48 patterns given on the command line.
49 The tape or holding file must be in a format written by the
50 <emphasis remap='B'>amdump</emphasis>
52 <emphasis remap='B'>amflush</emphasis>
56 <emphasis remap='I'>diskname</emphasis>
57 is not specified, all backups on the tape for the previous
58 <emphasis remap='I'>hostname</emphasis>
61 <emphasis remap='I'>datestamp</emphasis>
62 is not specified, all backups on the tape for the previous
63 <emphasis remap='I'>hostname</emphasis>
65 <emphasis remap='I'>diskname</emphasis>
68 <emphasis remap='I'>hostname</emphasis>,
69 <emphasis remap='I'>diskname</emphasis>
71 <emphasis remap='I'>datestamp</emphasis>
72 are specified, every backup on the tape is a candidate.</para>
74 <para><emphasis remap='I'>Hostname</emphasis>
76 <emphasis remap='I'>diskname</emphasis>
77 are special expressions described in the "HOST & DISK EXPRESSION" section
79 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
80 <emphasis remap='I'>Datestamp</emphasis>
81 are special expression described in the "DATESTAMP EXPRESSION" section
83 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
85 <emphasis remap='I'>diskname</emphasis>
86 is "rz[23]a", it would match disks
87 <emphasis remap='B'>rz2a</emphasis>
89 <emphasis remap='B'>rz3a</emphasis>.</para>
91 <para><emphasis remap='I'>Datestamp</emphasis>
93 <emphasis remap='B'>amflush</emphasis>
94 writes multiple backup runs to a single tape.</para>
99 candidate backup images are extracted to files
100 in the current directory named:</para>
103 <para><emphasis remap='I'>hostname.diskname.datestamp.dumplevel</emphasis></para>
106 <para>Amrestore doesn't use a changer, it restore from the tape already loaded
108 <emphasis remap='I'>tapedevice.</emphasis></para>
111 <refsect1><title>OPTIONS</title>
112 <variablelist remap='TP'>
114 <term><option>-b</option></term>
116 <para>Set the blocksize used to read the tape or holding file.
117 All holding files must be read with a blocksize of 32 KBytes.
118 <emphasis remap='B'>Amrestore</emphasis>
119 should normally be able to determine the blocksize for tapes
120 on its own and not need this parameter.</para>
125 <para>The default is 32 KBytes.</para>
126 <variablelist remap='TP'>
128 <term><option>-f</option></term>
130 <para>Do a rewind followed by a fsf <fileno> before trying to restore an image.</para>
134 <term><option>-l</option></term>
136 <para>Check if we restoring from the tape with the right
137 <emphasis remap='I'>label</emphasis></para>
141 <term><option>-p</option></term>
144 The first matching backup image is sent to standard output,
145 which is normally a pipe to
146 <emphasis remap='B'>restore</emphasis>
148 <emphasis remap='B'>tar</emphasis>,
150 <command>amrestore</command>
152 It may be run again to continue selecting backups to process.
153 Make sure you specify the no-rewind
154 <emphasis remap='I'>tapedevice</emphasis>
155 when doing this.</para>
161 <emphasis remap='B'>restore</emphasis>
162 may report "short read" errors when reading from a pipe.
164 <emphasis remap='B'>restore</emphasis>
165 support a blocking factor option to let you set the read block size,
166 and you should set it to 2.
167 See the example below.</para>
168 <variablelist remap='TP'>
170 <term><option>-c</option></term>
172 <para>Compress output using the fastest method the compression program provides.
173 <emphasis remap='B'>Amrestore</emphasis>
174 normally writes output files in a format understood by
175 <emphasis remap='B'>restore</emphasis>
177 <emphasis remap='B'>tar</emphasis>,
178 even if the backups on the tape are compressed.
184 <command>amrestore</command>
185 writes all files in compressed format,
186 even if the backups on the tape are not compressed.
187 Output file names will have a
191 extension depending on whether
192 <emphasis remap='B'>compress</emphasis>
194 <emphasis remap='B'>gzip</emphasis>
195 is the preferred compression program.
196 This option is useful when the current directory disk is small.</para>
200 <term><option>-C</option></term>
202 <para>Compress output using the best method the compression program provides
203 (may be very CPU intensive).
204 See the notes above about the
210 <term><option>-r</option></term>
213 Backup images are output exactly as they are on the tape,
215 <emphasis remap='B'>amdump</emphasis>
217 Output file names will have a
218 <markup>.RAW</markup>
220 This option is only useful for debugging and other strange circumstances.</para>
224 <term><option>-h</option></term>
227 The tape header block is output at the beginning of each file.
234 may also be used to compress the result.
235 <emphasis remap='B'>Amrecover</emphasis>
236 uses the header to determine the restore program to use.</para>
241 <para>If a header is written (-r or -h),
242 only 32 KBytes are output regardless of the tape blocksize.
243 This makes the resulting image usable as a holding file.</para>
245 <variablelist remap='TP'>
247 <term><emphasis remap='B'>-o</emphasis> <replaceable>configoption</replaceable></term>
249 <para>See the "<emphasis remap='B'>CONFIGURATION OVERRIDE</emphasis>" section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
256 <refsect1><title>EXAMPLES</title>
257 <para>The following does an interactive restore of disk
258 <emphasis remap='I'>rz3g</emphasis>
260 <emphasis remap='I'>seine</emphasis>,
261 to restore particular files.
263 <emphasis remap='B'>b</emphasis>
265 <emphasis remap='B'>restore</emphasis>,
266 which causes it to read in units of two 512-byte blocks (1 Kbyte)
268 This helps keep it from complaining about short reads.</para>
271 <literallayout remap='.nf'>
272 % amrestore -p /dev/nrmt9 seine rz3g | restore -ivbf 2 -
273 </literallayout> <!-- .fi -->
275 <para>The next example extracts all backup images for host
276 <emphasis remap='I'>seine</emphasis>.
277 This is the usual way to extract all data for a host after a disk crash.</para>
280 <literallayout remap='.nf'>
281 % amrestore /dev/nrmt9 seine
282 </literallayout> <!-- .fi -->
284 <para>If the backup datestamp in the above example is
285 <literal>19910125</literal>
287 <emphasis remap='I'>seine</emphasis>
288 has level 0 backups of disks
289 <emphasis remap='I'>rz1a</emphasis>
291 <emphasis remap='I'>rz1g</emphasis>
293 these files will be created in the current directory:</para>
296 <literallayout remap='.nf'>
297 seine.rz1a.19910125.0
298 seine.rz1g.19910125.0
299 </literallayout> <!-- .fi -->
301 <para>You may also use
302 <command>amrestore</command>
303 to extract a backup image from a holding disk
304 file that has not yet been flushed to tape:</para>
307 <literallayout remap='.nf'>
308 % amrestore -p /amanda/20001119/seine.rz1a.2 | restore -ivbf 2 -
309 </literallayout> <!-- .fi -->
311 <para><emphasis remap='B'>Amrestore</emphasis>
312 may be used to generate a listing of images on a tape:</para>
315 <literallayout remap='.nf'>
316 % mt -f /dev/nrmt9 rewind
317 % amrestore -p /dev/nrmt9 no-such-host > /dev/null
318 </literallayout> <!-- .fi -->
321 <command>amrestore</command>
322 to find images for host
323 <emphasis remap='B'>no-such-host</emphasis>.
324 It will not find any entries that match, but along the way will report
325 each image it skips.</para>
328 <refsect1><title>CAVEATS</title>
329 <para>&gnutar; must be used to restore files from backup images created with
331 Vendor tar programs sometimes fail to read GNU tar images.</para>
334 <refsect1><title>AUTHOR</title>
335 <para>James da Silva, &email.jds;, University of Maryland,
336 College Park: Original text</para>
337 <para>&maintainer.sgw;: XML-conversion</para>
340 <refsect1><title>SEE ALSO</title>
341 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
342 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
343 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
344 <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
345 <citerefentry><refentrytitle>restore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
346 <ulink url="http://wiki.zmanda.com"/>