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 '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>low-level data-extraction from Amanda volumes</refpurpose>
29 <!-- body begins here -->
32 <command>amrestore</command>
33 <arg choice='opt'>--config <replaceable>config</replaceable></arg>
34 <group choice='opt'><arg choice='plain'>-r </arg><arg choice='plain'>-c </arg><arg choice='plain'>-C </arg></group>
35 <arg choice='opt'>-b <replaceable>blocksize</replaceable></arg>
36 <arg choice='opt'>-f <replaceable>filenum</replaceable></arg>
37 <arg choice='opt'>-l <replaceable>label</replaceable></arg>
38 <arg choice='opt'>-p</arg>
39 <arg choice='opt'>-h</arg>
40 <arg choice='opt'>--exact-match</arg>
41 &configoverride.synopsis;
43 <arg choice='req'><replaceable>changerspec</replaceable></arg>
44 <arg choice='req'><arg choice='opt'>--holding</arg>
45 <replaceable>holdingfile</replaceable></arg>
48 <replaceable>hostname</replaceable>
50 <replaceable>diskname</replaceable>
52 <replaceable>datestamp</replaceable>
54 <replaceable>hostname</replaceable>
56 <replaceable>diskname</replaceable>
58 <replaceable>datestamp</replaceable>
68 <para>Note that this is the only Amanda command which does not take a configuration name as its first argument.</para>
72 <refsect1><title>DESCRIPTION</title>
74 <para><emphasis>Amrestore</emphasis> is a very low-level tool for extracting
75 data from Amanda volumes. It does not consult any catalog information or other
76 metadata, basing its operations only on the headers found on the volume. This
77 makes it an appropriate tool for bare-metal restores of an Amanda server, or
78 other situations where the catalog is not available.</para>
80 <para>See <manref name="amfetchdump" vol="8"/> and <manref name="amrecover"
81 vol="8"/> for higher-level recoveries.</para>
83 <para>The tool does not reassemble split dumps, but can uncompress compressed
84 dumps. Note that decompression may fail for split parts after the first. If
85 this occurs, extract the parts without decompressing, concatenate them, and
86 decompress the result.</para>
88 <para>Data is restored from the current volume in
89 <replaceable>changerspec</replaceable>, or from the holding file
90 <replaceable>holdingfile</replaceable>. In most cases,
91 <replaceable>changerspec</replaceable> will name a particular device, e.g.,
92 <computeroutput>tape:/dev/nst0</computeroutput> or
93 <computeroutput>s3:mybucket/tape-1</computeroutput>.</para>
95 <para>Only dumps matching the dump specification beginning with
96 <replaceable>hostname</replaceable> are extracted. If no specification is
97 given, every file on the volume (or the entire holdingfile) is restored. See
98 the "DUMP SPECIFICATIONS" section of <manref name="amanda-match" vol="7"/>
99 for more information.</para>
101 <para>Unless <option>-p</option> is used, candidate backup images are extracted
102 to files in the current directory named:
103 <filename>hostname.diskname.datestamp.dumplevel</filename></para>
107 <refsect1><title>OPTIONS</title>
111 <term><option>-b <replaceable>blocksize</replaceable></option></term>
113 <para>Use the given blocksize to read the volume. The default is defined by the
119 <term><option>-f <replaceable>filenum</replaceable></option></term>
121 <para>Seek to file <replaceable>filenum</replaceable> before beginning the
122 restore operation.</para>
127 <term><option>-l <replaceable>label</replaceable></option></term>
129 <para>Check that the volume has label <replaceable>label</replaceable>.</para>
134 <term><option>-p</option></term>
136 <para>Pipe the first matching file to standard output. This is typically used
137 in a shell pipeline to send the data to a process like <command>tar</command> for
143 <term><option>-c</option></term>
144 <term><option>-C</option></term>
146 <para>If the file is not already compressed, compress it using the fastest
147 (<option>-c</option>) or best (<option>-C</option>) compression algorithm.
148 Note that <command>amrestore</command> will not re-compress an
149 already-compressed file. Without either of these options,
150 <command>amrestore</command> will automatically uncompress any compressed
151 files. This option is useful when the destination disk is small.</para>
156 <term><option>-h</option></term>
158 <para>Include 32k headers on all output files, similar to a holding file. This
159 header can be read by another application or utility (see
160 <command>Amanda::Header</command>) during the next phase of processing.</para>
165 <term><option>-r</option></term>
167 <para>Output raw files. This is similar to <option>-h</option>, but also
168 disables any automatic decompression. Output file names will have a
169 <filename>.RAW</filename> extension.</para>
174 <term><option>--exact-match</option></term>
176 <para>The host and disk are parsed as exact values</para>
180 &configoverride.varlistentry;
186 <refsect1><title>EXAMPLES</title>
188 <para>The following does an interactive restore of disk
189 <emphasis>rz3g</emphasis> from host <emphasis>seine</emphasis>, to restore
190 particular files. Note the use of the <emphasis>b</emphasis> option to
191 <emphasis>restore</emphasis>, which causes it to read in units of two 512-byte
192 blocks (1 Kbyte) at a time. This helps keep it from complaining about short
196 amrestore -p /dev/nrmt9 seine rz3g | tar -xv
199 <para>The next example extracts all backup images for host
200 <emphasis>seine</emphasis>. This is a typical way to extract all data for a
201 host after a disk crash.</para>
204 amrestore /dev/nrmt9 seine
207 <para>If the backup datestamp in the above example is
208 <literal>20070125</literal> and <emphasis>seine</emphasis> has level 0 backups
209 of disks <emphasis>rz1a</emphasis> and <emphasis>rz1g</emphasis> on the tape,
210 these files will be created in the current directory:</para>
213 seine.rz1a.19910125.0
214 seine.rz1g.19910125.0
217 <para>You may also use <command>amrestore</command> to extract a backup image
218 from a holding disk file that has not yet been flushed to tape:</para>
221 amrestore -p /amanda/20001119/seine.rz1a.2 | tar -xv
226 <refsect1><title>CAVEATS</title>
228 <para>&gnutar; must be used to restore files from backup images created with
229 the GNUTAR dumptype. Vendor tar programs sometimes fail to read GNU Tar
235 <manref name="amanda-match" vol="7"/>,
236 <manref name="amfetchdump" vol="8"/>,
237 <manref name="amrecover" vol="8"/>,