Imported Upstream version 3.2.0
[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     &configoverride.synopsis;
41     <group>
42       <arg choice='req'><replaceable>changerspec</replaceable></arg>
43       <arg choice='req'><arg choice='opt'>--holding</arg>
44         <replaceable>holdingfile</replaceable></arg>
45     </group>
46     <arg choice='opt'>
47       <replaceable>hostname</replaceable>
48       <arg choice='opt'>
49         <replaceable>diskname</replaceable>
50         <arg choice='opt'>
51           <replaceable>datestamp</replaceable>
52           <arg choice='opt'>
53             <replaceable>hostname</replaceable>
54             <arg choice='opt'>
55               <replaceable>diskname</replaceable>
56               <arg choice='opt'>
57                 <replaceable>datestamp</replaceable>
58                 ...
59               </arg>
60             </arg>
61           </arg>
62         </arg>
63       </arg>
64     </arg>
65 </cmdsynopsis>
66
67 <para>Note that this is the only Amanda command which does not take a configuration name as its first argument.</para>
68
69 </refsynopsisdiv>
70
71 <refsect1><title>DESCRIPTION</title>
72
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>
78
79 <para>See <manref name="amfetchdump" vol="8"/> and <manref name="amrecover"
80 vol="8"/> for higher-level recoveries.</para>
81
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>
86
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>
93
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 "DUMP SPECIFICATIONS" section of <manref name="amanda-match" vol="7"/>
98 for more information.</para>
99
100 <para>Unless <option>-p</option> is used, candidate backup images are extracted
101 to files in the current directory named:
102 <filename>hostname.diskname.datestamp.dumplevel</filename></para>
103
104 </refsect1>
105
106 <refsect1><title>OPTIONS</title>
107 <variablelist>
108
109 <varlistentry>
110 <term><option>-b <replaceable>blocksize</replaceable></option></term>
111 <listitem>
112 <para>Use the given blocksize to read the volume.  The default is defined by the
113 device.</para>
114 </listitem>
115 </varlistentry>
116
117 <varlistentry>
118 <term><option>-f <replaceable>filenum</replaceable></option></term>
119 <listitem>
120 <para>Seek to file <replaceable>filenum</replaceable> before beginning the
121 restore operation.</para>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry>
126 <term><option>-l <replaceable>label</replaceable></option></term>
127 <listitem>
128 <para>Check that the volume has label <replaceable>label</replaceable>.</para>
129 </listitem>
130 </varlistentry>
131
132 <varlistentry>
133 <term><option>-p</option></term>
134 <listitem>
135 <para>Pipe the first matching file to standard output.  This is typically used
136 in a shell pipeline to send the data to a process like <command>tar</command> for
137 extraction.</para>
138 </listitem>
139 </varlistentry>
140
141 <varlistentry>
142 <term><option>-c</option></term>
143 <term><option>-C</option></term>
144 <listitem>
145 <para>If the file is not already compressed, compress it using the fastest
146 (<option>-c</option>) or best (<option>-C</option>) compression algorithm.
147 Note that <command>amrestore</command> will not re-compress an
148 already-compressed file.  Without either of these options,
149 <command>amrestore</command> will automatically uncompress any compressed
150 files.  This option is useful when the destination disk is small.</para>
151 </listitem>
152 </varlistentry>
153
154 <varlistentry>
155 <term><option>-h</option></term>
156 <listitem>
157 <para>Include 32k headers on all output files, similar to a holding file.  This
158 header can be read by another application or utility (see
159 <command>Amanda::Header</command>) during the next phase of processing.</para>
160 </listitem>
161 </varlistentry>
162
163 <varlistentry>
164 <term><option>-r</option></term>
165 <listitem>
166 <para>Output raw files.  This is similar to <option>-h</option>, but also
167 disables any automatic decompression.  Output file names will have a
168 <filename>.RAW</filename> extension.</para>
169 </listitem>
170 </varlistentry>
171
172   &configoverride.varlistentry;
173
174 </variablelist>
175
176 </refsect1>
177
178 <refsect1><title>EXAMPLES</title>
179
180 <para>The following does an interactive restore of disk
181 <emphasis>rz3g</emphasis> from host <emphasis>seine</emphasis>, to restore
182 particular files.  Note the use of the <emphasis>b</emphasis> option to
183 <emphasis>restore</emphasis>, which causes it to read in units of two 512-byte
184 blocks (1 Kbyte) at a time.  This helps keep it from complaining about short
185 reads.</para>
186
187 <programlisting>
188   amrestore -p /dev/nrmt9 seine rz3g | tar -xv
189 </programlisting>
190
191 <para>The next example extracts all backup images for host
192 <emphasis>seine</emphasis>.  This is a typical way to extract all data for a
193 host after a disk crash.</para>
194
195 <programlisting>
196   amrestore /dev/nrmt9 seine
197 </programlisting>
198
199 <para>If the backup datestamp in the above example is
200 <literal>20070125</literal> and <emphasis>seine</emphasis> has level 0 backups
201 of disks <emphasis>rz1a</emphasis> and <emphasis>rz1g</emphasis> on the tape,
202 these files will be created in the current directory:</para>
203
204 <programlisting>
205   seine.rz1a.19910125.0
206   seine.rz1g.19910125.0
207 </programlisting>
208
209 <para>You may also use <command>amrestore</command> to extract a backup image
210 from a holding disk file that has not yet been flushed to tape:</para>
211
212 <programlisting>
213   amrestore -p /amanda/20001119/seine.rz1a.2 | tar -xv
214 </programlisting>
215
216 </refsect1>
217
218 <refsect1><title>CAVEATS</title>
219
220 <para>&gnutar; must be used to restore files from backup images created with
221 the GNUTAR dumptype.  Vendor tar programs sometimes fail to read GNU Tar
222 images.</para>
223
224 </refsect1>
225
226 <seealso>
227 <manref name="amanda-match" vol="7"/>,
228 <manref name="amfetchdump" vol="8"/>,
229 <manref name="amrecover" vol="8"/>,
230 </seealso>
231
232 </refentry>
233