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 <arg choice='opt'><arg choice='plain'>-b </arg><arg choice='plain'><replaceable>blocksize</replaceable></arg></arg>
27 <arg choice='opt'><arg choice='plain'>-f </arg><arg choice='plain'><replaceable>fileno</replaceable></arg></arg>
28 <arg choice='opt'><arg choice='plain'>-l </arg><arg choice='plain'><replaceable>label</replaceable></arg></arg>
29 <arg choice='opt'>-p </arg>
30 <arg choice='opt'>-h </arg>
31 <group choice='plain'><arg choice='plain'><replaceable>tapedevice</replaceable></arg><arg choice='plain'><replaceable>holdingfile</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>hostname</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>diskname</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>datestamp</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>hostname</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>diskname</replaceable></arg><arg choice='opt' rep='repeat'><replaceable>datestamp</replaceable></arg></arg></arg></arg></arg></arg></group>
36 <refsect1><title>DESCRIPTION</title>
37 <para><emphasis remap='B'>Amrestore</emphasis>
38 extracts backup images from the tape mounted on
39 <emphasis remap='I'>tapedevice</emphasis>
40 or from the holding disk file
41 <emphasis remap='I'>holdingfile</emphasis>
43 <emphasis remap='I'>hostname</emphasis>,
44 <emphasis remap='I'>diskname</emphasis>
46 <emphasis remap='I'>datestamp</emphasis>
47 patterns given on the command line.
48 The tape or holding file must be in a format written by the
49 <emphasis remap='B'>amdump</emphasis>
51 <emphasis remap='B'>amflush</emphasis>
55 <emphasis remap='I'>diskname</emphasis>
56 is not specified, all backups on the tape for the previous
57 <emphasis remap='I'>hostname</emphasis>
60 <emphasis remap='I'>datestamp</emphasis>
61 is not specified, all backups on the tape for the previous
62 <emphasis remap='I'>hostname</emphasis>
64 <emphasis remap='I'>diskname</emphasis>
67 <emphasis remap='I'>hostname</emphasis>,
68 <emphasis remap='I'>diskname</emphasis>
70 <emphasis remap='I'>datestamp</emphasis>
71 are specified, every backup on the tape is a candidate.</para>
73 <para><emphasis remap='I'>Hostname</emphasis>
75 <emphasis remap='I'>diskname</emphasis>
76 are special expressions described in the "HOST & DISK EXPRESSION" section
78 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
79 <emphasis remap='I'>Datestamp</emphasis>
80 are special expression described in the "DATESTAMP EXPRESSION" section
82 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
84 <emphasis remap='I'>diskname</emphasis>
85 is "rz[23]a", it would match disks
86 <emphasis remap='B'>rz2a</emphasis>
88 <emphasis remap='B'>rz3a</emphasis>.</para>
90 <para><emphasis remap='I'>Datestamp</emphasis>
92 <emphasis remap='B'>amflush</emphasis>
93 writes multiple backup runs to a single tape.</para>
98 candidate backup images are extracted to files
99 in the current directory named:</para>
102 <para><emphasis remap='I'>hostname.diskname.datestamp.dumplevel</emphasis></para>
105 <para>Amrestore doesn't use a changer, it restore from the tape already loaded
107 <emphasis remap='I'>tapedevice.</emphasis></para>
110 <refsect1><title>OPTIONS</title>
111 <variablelist remap='TP'>
113 <term><option>-b</option></term>
115 <para>Set the blocksize used to read the tape or holding file.
116 All holding files must be read with a blocksize of 32 KBytes.
117 <emphasis remap='B'>Amrestore</emphasis>
118 should normally be able to determine the blocksize for tapes
119 on its own and not need this parameter.</para>
124 <para>The default is 32 KBytes.</para>
125 <variablelist remap='TP'>
127 <term><option>-f</option></term>
129 <para>Do a rewind followed by a fsf <fileno> before trying to restore an image.</para>
133 <term><option>-l</option></term>
135 <para>Check if we restoring from the tape with the right
136 <emphasis remap='I'>label</emphasis></para>
140 <term><option>-p</option></term>
143 The first matching backup image is sent to standard output,
144 which is normally a pipe to
145 <emphasis remap='B'>restore</emphasis>
147 <emphasis remap='B'>tar</emphasis>,
149 <command>amrestore</command>
151 It may be run again to continue selecting backups to process.
152 Make sure you specify the no-rewind
153 <emphasis remap='I'>tapedevice</emphasis>
154 when doing this.</para>
160 <emphasis remap='B'>restore</emphasis>
161 may report "short read" errors when reading from a pipe.
163 <emphasis remap='B'>restore</emphasis>
164 support a blocking factor option to let you set the read block size,
165 and you should set it to 2.
166 See the example below.</para>
167 <variablelist remap='TP'>
169 <term><option>-c</option></term>
171 <para>Compress output using the fastest method the compression program provides.
172 <emphasis remap='B'>Amrestore</emphasis>
173 normally writes output files in a format understood by
174 <emphasis remap='B'>restore</emphasis>
176 <emphasis remap='B'>tar</emphasis>,
177 even if the backups on the tape are compressed.
183 <command>amrestore</command>
184 writes all files in compressed format,
185 even if the backups on the tape are not compressed.
186 Output file names will have a
190 extension depending on whether
191 <emphasis remap='B'>compress</emphasis>
193 <emphasis remap='B'>gzip</emphasis>
194 is the preferred compression program.
195 This option is useful when the current directory disk is small.</para>
199 <term><option>-C</option></term>
201 <para>Compress output using the best method the compression program provides
202 (may be very CPU intensive).
203 See the notes above about the
209 <term><option>-r</option></term>
212 Backup images are output exactly as they are on the tape,
214 <emphasis remap='B'>amdump</emphasis>
216 Output file names will have a
217 <markup>.RAW</markup>
219 This option is only useful for debugging and other strange circumstances.</para>
223 <term><option>-h</option></term>
226 The tape header block is output at the beginning of each file.
233 may also be used to compress the result.
234 <emphasis remap='B'>Amrecover</emphasis>
235 uses the header to determine the restore program to use.</para>
240 <para>If a header is written (-r or -h),
241 only 32 KBytes are output regardless of the tape blocksize.
242 This makes the resulting image usable as a holding file.</para>
245 <refsect1><title>EXAMPLES</title>
246 <para>The following does an interactive restore of disk
247 <emphasis remap='I'>rz3g</emphasis>
249 <emphasis remap='I'>seine</emphasis>,
250 to restore particular files.
252 <emphasis remap='B'>b</emphasis>
254 <emphasis remap='B'>restore</emphasis>,
255 which causes it to read in units of two 512-byte blocks (1 Kbyte)
257 This helps keep it from complaining about short reads.</para>
260 <literallayout remap='.nf'>
261 % amrestore -p /dev/nrmt9 seine rz3g | restore -ivbf 2 -
262 </literallayout> <!-- .fi -->
264 <para>The next example extracts all backup images for host
265 <emphasis remap='I'>seine</emphasis>.
266 This is the usual way to extract all data for a host after a disk crash.</para>
269 <literallayout remap='.nf'>
270 % amrestore /dev/nrmt9 seine
271 </literallayout> <!-- .fi -->
273 <para>If the backup datestamp in the above example is
274 <literal>19910125</literal>
276 <emphasis remap='I'>seine</emphasis>
277 has level 0 backups of disks
278 <emphasis remap='I'>rz1a</emphasis>
280 <emphasis remap='I'>rz1g</emphasis>
282 these files will be created in the current directory:</para>
285 <literallayout remap='.nf'>
286 seine.rz1a.19910125.0
287 seine.rz1g.19910125.0
288 </literallayout> <!-- .fi -->
290 <para>You may also use
291 <command>amrestore</command>
292 to extract a backup image from a holding disk
293 file that has not yet been flushed to tape:</para>
296 <literallayout remap='.nf'>
297 % amrestore -p /amanda/20001119/seine.rz1a.2 | restore -ivbf 2 -
298 </literallayout> <!-- .fi -->
300 <para><emphasis remap='B'>Amrestore</emphasis>
301 may be used to generate a listing of images on a tape:</para>
304 <literallayout remap='.nf'>
305 % mt -f /dev/nrmt9 rewind
306 % amrestore -p /dev/nrmt9 no-such-host > /dev/null
307 </literallayout> <!-- .fi -->
310 <command>amrestore</command>
311 to find images for host
312 <emphasis remap='B'>no-such-host</emphasis>.
313 It will not find any entries that match, but along the way will report
314 each image it skips.</para>
317 <refsect1><title>CAVEATS</title>
318 <para>&gnutar; must be used to restore files from backup images created with
320 Vendor tar programs sometimes fail to read GNU tar images.</para>
323 <refsect1><title>AUTHOR</title>
324 <para>James da Silva, &email.jds;, University of Maryland,
325 College Park: Original text</para>
326 <para>&maintainer.sgw;: XML-conversion</para>
329 <refsect1><title>SEE ALSO</title>
330 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
331 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
332 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
333 <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>
334 <citerefentry><refentrytitle>restore</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>