Imported Upstream version 3.3.3
[debian/amanda] / man / xml-source / amrestore.8.xml
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"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM 'global.entities'>
7   %global_entities;
8 ]>
9
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amrestore.8'>
12
13 <refmeta>
14 <refentrytitle>amrestore</refentrytitle>
15 <manvolnum>8</manvolnum>
16 &rmi.source;
17 &rmi.version;
18 &rmi.manual.8;
19 </refmeta>
20 <refnamediv>
21 <refname>amrestore</refname>
22 <refpurpose>low-level data-extraction from Amanda volumes</refpurpose>
23 </refnamediv>
24 <refentryinfo>
25 &author.jds;
26 &author.sgw.xml;
27 &author.dustin;
28 </refentryinfo>
29 <!-- body begins here -->
30 <refsynopsisdiv>
31 <cmdsynopsis>
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;
42     <group>
43       <arg choice='req'><replaceable>changerspec</replaceable></arg>
44       <arg choice='req'><arg choice='opt'>--holding</arg>
45         <replaceable>holdingfile</replaceable></arg>
46     </group>
47     <arg choice='opt'>
48       <replaceable>hostname</replaceable>
49       <arg choice='opt'>
50         <replaceable>diskname</replaceable>
51         <arg choice='opt'>
52           <replaceable>datestamp</replaceable>
53           <arg choice='opt'>
54             <replaceable>hostname</replaceable>
55             <arg choice='opt'>
56               <replaceable>diskname</replaceable>
57               <arg choice='opt'>
58                 <replaceable>datestamp</replaceable>
59                 ...
60               </arg>
61             </arg>
62           </arg>
63         </arg>
64       </arg>
65     </arg>
66 </cmdsynopsis>
67
68 <para>Note that this is the only Amanda command which does not take a configuration name as its first argument.</para>
69
70 </refsynopsisdiv>
71
72 <refsect1><title>DESCRIPTION</title>
73
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>
79
80 <para>See <manref name="amfetchdump" vol="8"/> and <manref name="amrecover"
81 vol="8"/> for higher-level recoveries.</para>
82
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>
87
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>
94
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>
100
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>
104
105 </refsect1>
106
107 <refsect1><title>OPTIONS</title>
108 <variablelist>
109
110 <varlistentry>
111 <term><option>-b <replaceable>blocksize</replaceable></option></term>
112 <listitem>
113 <para>Use the given blocksize to read the volume.  The default is defined by the
114 device.</para>
115 </listitem>
116 </varlistentry>
117
118 <varlistentry>
119 <term><option>-f <replaceable>filenum</replaceable></option></term>
120 <listitem>
121 <para>Seek to file <replaceable>filenum</replaceable> before beginning the
122 restore operation.</para>
123 </listitem>
124 </varlistentry>
125
126 <varlistentry>
127 <term><option>-l <replaceable>label</replaceable></option></term>
128 <listitem>
129 <para>Check that the volume has label <replaceable>label</replaceable>.</para>
130 </listitem>
131 </varlistentry>
132
133 <varlistentry>
134 <term><option>-p</option></term>
135 <listitem>
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
138 extraction.</para>
139 </listitem>
140 </varlistentry>
141
142 <varlistentry>
143 <term><option>-c</option></term>
144 <term><option>-C</option></term>
145 <listitem>
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>
152 </listitem>
153 </varlistentry>
154
155 <varlistentry>
156 <term><option>-h</option></term>
157 <listitem>
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>
161 </listitem>
162 </varlistentry>
163
164 <varlistentry>
165 <term><option>-r</option></term>
166 <listitem>
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>
170 </listitem>
171 </varlistentry>
172
173 <varlistentry>
174 <term><option>--exact-match</option></term>
175 <listitem>
176 <para>The host and disk are parsed as exact values</para>
177 </listitem>
178 </varlistentry>
179
180   &configoverride.varlistentry;
181
182 </variablelist>
183
184 </refsect1>
185
186 <refsect1><title>EXAMPLES</title>
187
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
193 reads.</para>
194
195 <programlisting>
196   amrestore -p /dev/nrmt9 seine rz3g | tar -xv
197 </programlisting>
198
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>
202
203 <programlisting>
204   amrestore /dev/nrmt9 seine
205 </programlisting>
206
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>
211
212 <programlisting>
213   seine.rz1a.19910125.0
214   seine.rz1g.19910125.0
215 </programlisting>
216
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>
219
220 <programlisting>
221   amrestore -p /amanda/20001119/seine.rz1a.2 | tar -xv
222 </programlisting>
223
224 </refsect1>
225
226 <refsect1><title>CAVEATS</title>
227
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
230 images.</para>
231
232 </refsect1>
233
234 <seealso>
235 <manref name="amanda-match" vol="7"/>,
236 <manref name="amfetchdump" vol="8"/>,
237 <manref name="amrecover" vol="8"/>,
238 </seealso>
239
240 </refentry>
241