Imported Upstream version 3.3.2
[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: 07/25/2012
6 .\"    Manual: System Administration Commands
7 .\"    Source: Amanda 3.3.2
8 .\"  Language: English
9 .\"
10 .TH "AMRESTORE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "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] [\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\-o \fR\fB\fIconfigoption\fR\fR
120 .RS 4
121 See the "CONFIGURATION OVERRIDE" section in
122 \fBamanda\fR(8)\&.
123 .RE
124 .SH "EXAMPLES"
125 .PP
126 The following does an interactive restore of disk
127 \fIrz3g\fR
128 from host
129 \fIseine\fR, to restore particular files\&. Note the use of the
130 \fIb\fR
131 option to
132 \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\&.
133 .nf
134   amrestore \-p /dev/nrmt9 seine rz3g | tar \-xv
135 .fi
136 .PP
137 The next example extracts all backup images for host
138 \fIseine\fR\&. This is a typical way to extract all data for a host after a disk crash\&.
139 .nf
140   amrestore /dev/nrmt9 seine
141 .fi
142 .PP
143 If the backup datestamp in the above example is
144 20070125
145 and
146 \fIseine\fR
147 has level 0 backups of disks
148 \fIrz1a\fR
149 and
150 \fIrz1g\fR
151 on the tape, these files will be created in the current directory:
152 .nf
153   seine\&.rz1a\&.19910125\&.0
154   seine\&.rz1g\&.19910125\&.0
155 .fi
156 .PP
157 You may also use
158 \fBamrestore\fR
159 to extract a backup image from a holding disk file that has not yet been flushed to tape:
160 .nf
161   amrestore \-p /amanda/20001119/seine\&.rz1a\&.2 | tar \-xv
162 .fi
163 .SH "CAVEATS"
164 .PP
165 \fBGNU\-tar\fR
166 must be used to restore files from backup images created with the GNUTAR dumptype\&. Vendor tar programs sometimes fail to read GNU Tar images\&.
167 .SH "SEE ALSO"
168 .PP
169 \fBamanda\fR(8),
170 \fBamanda-match\fR(7),
171 \fBamfetchdump\fR(8),
172 \fBamrecover\fR(8)
173 .PP
174 The Amanda Wiki:
175 : http://wiki.zmanda.com/
176 .SH "AUTHORS"
177 .PP
178 \fBJames da Silva\fR <\&jds@amanda\&.org\&>
179 .PP
180 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>
181 .PP
182 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
183 .RS 4
184 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
185 .RE