Imported Upstream version 3.3.3
[debian/amanda] / man / amrestore.8
1 '\" t
2 .\"     Title: amrestore
3 .\"    Author: James da Silva <jds@amanda.org>
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 01/10/2013
6 .\"    Manual: System Administration Commands
7 .\"    Source: Amanda 3.3.3
8 .\"  Language: English
9 .\"
10 .TH "AMRESTORE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 amrestore \- low\-level data\-extraction from Amanda volumes
32 .SH "SYNOPSIS"
33 .HP \w'\fBamrestore\fR\ 'u
34 \fBamrestore\fR [\-\-config\ \fIconfig\fR] [\-r | \-c | \-C] [\-b\ \fIblocksize\fR] [\-f\ \fIfilenum\fR] [\-l\ \fIlabel\fR] [\-p] [\-h] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] [{\fIchangerspec\fR} | {[\-\-holding]\ \fIholdingfile\fR}] [\fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ [\ \fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ \&.\&.\&.\ ]\ ]\ ]\ ]\ ]]
35 .PP
36 Note that this is the only Amanda command which does not take a configuration name as its first argument\&.
37 .SH "DESCRIPTION"
38 .PP
39 \fIAmrestore\fR
40 is a very low\-level tool for extracting data from Amanda volumes\&. It does not consult any catalog information or other metadata, basing its operations only on the headers found on the volume\&. This makes it an appropriate tool for bare\-metal restores of an Amanda server, or other situations where the catalog is not available\&.
41 .PP
42 See
43 \fBamfetchdump\fR(8)
44 and
45 \fBamrecover\fR(8)
46 for higher\-level recoveries\&.
47 .PP
48 The tool does not reassemble split dumps, but can uncompress compressed dumps\&. Note that decompression may fail for split parts after the first\&. If this occurs, extract the parts without decompressing, concatenate them, and decompress the result\&.
49 .PP
50 Data is restored from the current volume in
51 \fIchangerspec\fR, or from the holding file
52 \fIholdingfile\fR\&. In most cases,
53 \fIchangerspec\fR
54 will name a particular device, e\&.g\&.,
55 tape:/dev/nst0
56 or
57 s3:mybucket/tape\-1\&.
58 .PP
59 Only dumps matching the dump specification beginning with
60 \fIhostname\fR
61 are extracted\&. If no specification is given, every file on the volume (or the entire holdingfile) is restored\&. See the "DUMP SPECIFICATIONS" section of
62 \fBamanda-match\fR(7)
63 for more information\&.
64 .PP
65 Unless
66 \fB\-p\fR
67 is used, candidate backup images are extracted to files in the current directory named:
68 hostname\&.diskname\&.datestamp\&.dumplevel
69 .SH "OPTIONS"
70 .PP
71 \fB\-b \fR\fB\fIblocksize\fR\fR
72 .RS 4
73 Use the given blocksize to read the volume\&. The default is defined by the device\&.
74 .RE
75 .PP
76 \fB\-f \fR\fB\fIfilenum\fR\fR
77 .RS 4
78 Seek to file
79 \fIfilenum\fR
80 before beginning the restore operation\&.
81 .RE
82 .PP
83 \fB\-l \fR\fB\fIlabel\fR\fR
84 .RS 4
85 Check that the volume has label
86 \fIlabel\fR\&.
87 .RE
88 .PP
89 \fB\-p\fR
90 .RS 4
91 Pipe the first matching file to standard output\&. This is typically used in a shell pipeline to send the data to a process like
92 \fBtar\fR
93 for extraction\&.
94 .RE
95 .PP
96 \fB\-c\fR, \fB\-C\fR
97 .RS 4
98 If the file is not already compressed, compress it using the fastest (\fB\-c\fR) or best (\fB\-C\fR) compression algorithm\&. Note that
99 \fBamrestore\fR
100 will not re\-compress an already\-compressed file\&. Without either of these options,
101 \fBamrestore\fR
102 will automatically uncompress any compressed files\&. This option is useful when the destination disk is small\&.
103 .RE
104 .PP
105 \fB\-h\fR
106 .RS 4
107 Include 32k headers on all output files, similar to a holding file\&. This header can be read by another application or utility (see
108 \fBAmanda::Header\fR) during the next phase of processing\&.
109 .RE
110 .PP
111 \fB\-r\fR
112 .RS 4
113 Output raw files\&. This is similar to
114 \fB\-h\fR, but also disables any automatic decompression\&. Output file names will have a
115 \&.RAW
116 extension\&.
117 .RE
118 .PP
119 \fB\-\-exact\-match\fR
120 .RS 4
121 The host and disk are parsed as exact values
122 .RE
123 .PP
124 \fB\-o \fR\fB\fIconfigoption\fR\fR
125 .RS 4
126 See the "CONFIGURATION OVERRIDE" section in
127 \fBamanda\fR(8)\&.
128 .RE
129 .SH "EXAMPLES"
130 .PP
131 The following does an interactive restore of disk
132 \fIrz3g\fR
133 from host
134 \fIseine\fR, to restore particular files\&. Note the use of the
135 \fIb\fR
136 option to
137 \fIrestore\fR, which causes it to read in units of two 512\-byte blocks (1 Kbyte) at a time\&. This helps keep it from complaining about short reads\&.
138 .nf
139   amrestore \-p /dev/nrmt9 seine rz3g | tar \-xv
140 .fi
141 .PP
142 The next example extracts all backup images for host
143 \fIseine\fR\&. This is a typical way to extract all data for a host after a disk crash\&.
144 .nf
145   amrestore /dev/nrmt9 seine
146 .fi
147 .PP
148 If the backup datestamp in the above example is
149 20070125
150 and
151 \fIseine\fR
152 has level 0 backups of disks
153 \fIrz1a\fR
154 and
155 \fIrz1g\fR
156 on the tape, these files will be created in the current directory:
157 .nf
158   seine\&.rz1a\&.19910125\&.0
159   seine\&.rz1g\&.19910125\&.0
160 .fi
161 .PP
162 You may also use
163 \fBamrestore\fR
164 to extract a backup image from a holding disk file that has not yet been flushed to tape:
165 .nf
166   amrestore \-p /amanda/20001119/seine\&.rz1a\&.2 | tar \-xv
167 .fi
168 .SH "CAVEATS"
169 .PP
170 \fBGNU\-tar\fR
171 must be used to restore files from backup images created with the GNUTAR dumptype\&. Vendor tar programs sometimes fail to read GNU Tar images\&.
172 .SH "SEE ALSO"
173 .PP
174 \fBamanda\fR(8),
175 \fBamanda-match\fR(7),
176 \fBamfetchdump\fR(8),
177 \fBamrecover\fR(8)
178 .PP
179 The Amanda Wiki:
180 : http://wiki.zmanda.com/
181 .SH "AUTHORS"
182 .PP
183 \fBJames da Silva\fR <\&jds@amanda\&.org\&>
184 .PP
185 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>
186 .PP
187 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
188 .RS 4
189 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
190 .RE