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 &configoverride.synopsis;
42 <arg choice='req'><replaceable>changerspec</replaceable></arg>
43 <arg choice='req'><arg choice='opt'>--holding</arg>
44 <replaceable>holdingfile</replaceable></arg>
47 <replaceable>hostname</replaceable>
49 <replaceable>diskname</replaceable>
51 <replaceable>datestamp</replaceable>
53 <replaceable>hostname</replaceable>
55 <replaceable>diskname</replaceable>
57 <replaceable>datestamp</replaceable>
67 <para>Note that this is the only Amanda command which does not take a configuration name as its first argument.</para>
71 <refsect1><title>DESCRIPTION</title>
73 <para><emphasis>Amrestore</emphasis> is a very low-level tool for extracting
74 data from Amanda volumes. It does not consult any catalog information or other
75 metadata, basing its operations only on the headers found on the volume. This
76 makes it an appropriate tool for bare-metal restores of an Amanda server, or
77 other situations where the catalog is not available.</para>
79 <para>See <manref name="amfetchdump" vol="8"/> and <manref name="amrecover"
80 vol="8"/> for higher-level recoveries.</para>
82 <para>The tool does not reassemble split dumps, but can uncompress compressed
83 dumps. Note that decompression may fail for split parts after the first. If
84 this occurs, extract the parts without decompressing, concatenate them, and
85 decompress the result.</para>
87 <para>Data is restored from the current volume in
88 <replaceable>changerspec</replaceable>, or from the holding file
89 <replaceable>holdingfile</replaceable>. In most cases,
90 <replaceable>changerspec</replaceable> will name a particular device, e.g.,
91 <computeroutput>tape:/dev/nst0</computeroutput> or
92 <computeroutput>s3:mybucket/tape-1</computeroutput>.</para>
94 <para>Only dumps matching the dump specification beginning with
95 <replaceable>hostname</replaceable> are extracted. If no specification is
96 given, every file on the volume (or the entire holdingfile) is restored. See
97 the "HOST & DISK EXPRESSIONS" section of <manref name="amanda" vol="8"/>
98 for the format of the <replaceable>hostname</replaceable> and
99 <replaceable>diskname</replaceable> parameters, and the "DATESTAMP EXPRESSIONS"
100 section for the format of the <replaceable>datestamp</replaceable>
103 <para>Unless <option>-p</option> is used, candidate backup images are extracted
104 to files in the current directory named:
105 <filename>hostname.diskname.datestamp.dumplevel</filename></para>
109 <refsect1><title>OPTIONS</title>
113 <term><option>-b <replaceable>blocksize</replaceable></option></term>
115 <para>Use the given blocksize to read the volume. The default is defined by the
121 <term><option>-f <replaceable>filenum</replaceable></option></term>
123 <para>Seek to file <replaceable>filenum</replaceable> before beginning the
124 restore operation.</para>
129 <term><option>-l <replaceable>label</replaceable></option></term>
131 <para>Check that the volume has label <replaceable>label</replaceable>.</para>
136 <term><option>-p</option></term>
138 <para>Pipe the first matching file to standard output. This is typically used
139 in a shell pipeline to send the data to a process like <command>tar</command> for
145 <term><option>-c</option></term>
146 <term><option>-C</option></term>
148 <para>If the file is not already compressed, compress it using the fastest
149 (<option>-c</option>) or best (<option>-C</option>) compression algorithm.
150 Note that <command>amrestore</command> will not re-compress an
151 already-compressed file. Without either of these options,
152 <command>amrestore</command> will automatically uncompress any compressed
153 files. This option is useful when the destination disk is small.</para>
158 <term><option>-h</option></term>
160 <para>Include 32k headers on all output files, similar to a holding file. This
161 header can be read by another application or utility (see
162 <command>Amanda::Header</command>) during the next phase of processing.</para>
167 <term><option>-r</option></term>
169 <para>Output raw files. This is similar to <option>-h</option>, but also
170 disables any automatic decompression. Output file names will have a
171 <filename>.RAW</filename> extension.</para>
175 &configoverride.varlistentry;
181 <refsect1><title>EXAMPLES</title>
183 <para>The following does an interactive restore of disk
184 <emphasis>rz3g</emphasis> from host <emphasis>seine</emphasis>, to restore
185 particular files. Note the use of the <emphasis>b</emphasis> option to
186 <emphasis>restore</emphasis>, which causes it to read in units of two 512-byte
187 blocks (1 Kbyte) at a time. This helps keep it from complaining about short
191 amrestore -p /dev/nrmt9 seine rz3g | tar -xv
194 <para>The next example extracts all backup images for host
195 <emphasis>seine</emphasis>. This is a typical way to extract all data for a
196 host after a disk crash.</para>
199 amrestore /dev/nrmt9 seine
202 <para>If the backup datestamp in the above example is
203 <literal>20070125</literal> and <emphasis>seine</emphasis> has level 0 backups
204 of disks <emphasis>rz1a</emphasis> and <emphasis>rz1g</emphasis> on the tape,
205 these files will be created in the current directory:</para>
208 seine.rz1a.19910125.0
209 seine.rz1g.19910125.0
212 <para>You may also use <command>amrestore</command> to extract a backup image
213 from a holding disk file that has not yet been flushed to tape:</para>
216 amrestore -p /amanda/20001119/seine.rz1a.2 | tar -xv
221 <refsect1><title>CAVEATS</title>
223 <para>&gnutar; must be used to restore files from backup images created with
224 the GNUTAR dumptype. Vendor tar programs sometimes fail to read GNU Tar
230 <manref name="amfetchdump" vol="8"/>,
231 <manref name="amrecover" vol="8"/>,