Imported Upstream version 3.1.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/01/2010
6 .\"    Manual: System Administration Commands
7 .\"    Source: Amanda 3.1.0
8 .\"  Language: English
9 .\"
10 .TH "AMRESTORE" "8" "06/01/2010" "Amanda 3\&.1\&.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 "HOST & DISK EXPRESSIONS" section of
53 \fBamanda\fR(8)
54 for the format of the
55 \fIhostname\fR
56 and
57 \fIdiskname\fR
58 parameters, and the "DATESTAMP EXPRESSIONS" section for the format of the
59 \fIdatestamp\fR
60 parameters\&.
61 .PP
62 Unless
63 \fB\-p\fR
64 is used, candidate backup images are extracted to files in the current directory named:
65 hostname\&.diskname\&.datestamp\&.dumplevel
66 .SH "OPTIONS"
67 .PP
68 \fB\-b \fR\fB\fIblocksize\fR\fR
69 .RS 4
70 Use the given blocksize to read the volume\&. The default is defined by the device\&.
71 .RE
72 .PP
73 \fB\-f \fR\fB\fIfilenum\fR\fR
74 .RS 4
75 Seek to file
76 \fIfilenum\fR
77 before beginning the restore operation\&.
78 .RE
79 .PP
80 \fB\-l \fR\fB\fIlabel\fR\fR
81 .RS 4
82 Check that the volume has label
83 \fIlabel\fR\&.
84 .RE
85 .PP
86 \fB\-p\fR
87 .RS 4
88 Pipe the first matching file to standard output\&. This is typically used in a shell pipeline to send the data to a process like
89 \fBtar\fR
90 for extraction\&.
91 .RE
92 .PP
93 \fB\-c\fR, \fB\-C\fR
94 .RS 4
95 If the file is not already compressed, compress it using the fastest (\fB\-c\fR) or best (\fB\-C\fR) compression algorithm\&. Note that
96 \fBamrestore\fR
97 will not re\-compress an already\-compressed file\&. Without either of these options,
98 \fBamrestore\fR
99 will automatically uncompress any compressed files\&. This option is useful when the destination disk is small\&.
100 .RE
101 .PP
102 \fB\-h\fR
103 .RS 4
104 Include 32k headers on all output files, similar to a holding file\&. This header can be read by another application or utility (see
105 \fBAmanda::Header\fR) during the next phase of processing\&.
106 .RE
107 .PP
108 \fB\-r\fR
109 .RS 4
110 Output raw files\&. This is similar to
111 \fB\-h\fR, but also disables any automatic decompression\&. Output file names will have a
112 \&.RAW
113 extension\&.
114 .RE
115 .PP
116 \fB\-o \fR\fB\fIconfigoption\fR\fR
117 .RS 4
118 See the "CONFIGURATION OVERRIDE" section in
119 \fBamanda\fR(8)\&.
120 .RE
121 .SH "EXAMPLES"
122 .PP
123 The following does an interactive restore of disk
124 \fIrz3g\fR
125 from host
126 \fIseine\fR, to restore particular files\&. Note the use of the
127 \fIb\fR
128 option to
129 \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\&.
130 .nf
131   amrestore \-p /dev/nrmt9 seine rz3g | tar \-xv
132 .fi
133 .PP
134 The next example extracts all backup images for host
135 \fIseine\fR\&. This is a typical way to extract all data for a host after a disk crash\&.
136 .nf
137   amrestore /dev/nrmt9 seine
138 .fi
139 .PP
140 If the backup datestamp in the above example is
141 20070125
142 and
143 \fIseine\fR
144 has level 0 backups of disks
145 \fIrz1a\fR
146 and
147 \fIrz1g\fR
148 on the tape, these files will be created in the current directory:
149 .nf
150   seine\&.rz1a\&.19910125\&.0
151   seine\&.rz1g\&.19910125\&.0
152 .fi
153 .PP
154 You may also use
155 \fBamrestore\fR
156 to extract a backup image from a holding disk file that has not yet been flushed to tape:
157 .nf
158   amrestore \-p /amanda/20001119/seine\&.rz1a\&.2 | tar \-xv
159 .fi
160 .SH "CAVEATS"
161 .PP
162 \fBGNU\-tar\fR
163 must be used to restore files from backup images created with the GNUTAR dumptype\&. Vendor tar programs sometimes fail to read GNU Tar images\&.
164 .SH "SEE ALSO"
165 .PP
166 \fBamanda\fR(8),
167 \fBamfetchdump\fR(8),
168 \fBamrecover\fR(8)
169 .PP
170 The Amanda Wiki:
171 : http://wiki.zmanda.com/
172 .SH "AUTHORS"
173 .PP
174 \fBJames da Silva\fR <\&jds@amanda\&.org\&>
175 .PP
176 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>
177 .PP
178 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
179 .RS 4
180 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
181 .RE