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