2 .\" Author: James da Silva <jds@amanda.org>
3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
5 .\" Manual: System Administration Commands
6 .\" Source: Amanda 2.6.1
9 .TH "AMRESTORE" "8" "01/22/2009" "Amanda 2\&.6\&.1" "System Administration Commands"
10 .\" -----------------------------------------------------------------
11 .\" * (re)Define some macros
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" toupper - uppercase a string (locale-aware)
15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" SH-xref - format a cross-reference to an SH section
23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 .\" SH - level-one heading that works better for non-TTY output
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 .\" put an extra blank line of space above the head in non-TTY output
43 .nr an-prevailing-indent \\n[IN]
47 .HTML-TAG ".NH \\n[an-level]"
49 .nr an-no-space-flag 1
51 \." make the size of the head bigger
56 .\" if n (TTY output), use uppercase
61 .\" if not n (not TTY), use normal case (not uppercase)
65 .\" if not n (not TTY), put a border/line under subheading
70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 .\" SS - level-two heading that works better for non-TTY output
72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77 .nr an-prevailing-indent \\n[IN]
82 .nr an-no-space-flag 1
85 \." make the size of the head bigger
91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 .\" BB/BE - put background/screen (filled box) around block of text
93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106 .if "\\$2"adjust-for-leading-newline" \{\
114 .nr BW \\n(.lu-\\n(.i
117 .ie "\\$2"adjust-for-leading-newline" \{\
118 \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 .\" BM/EM - put colored marker in margin next to block of text
134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
159 .\" -----------------------------------------------------------------
160 .\" * set default formatting
161 .\" -----------------------------------------------------------------
162 .\" disable hyphenation
164 .\" disable justification (adjust text to left margin only)
166 .\" -----------------------------------------------------------------
167 .\" * MAIN CONTENT STARTS HERE *
168 .\" -----------------------------------------------------------------
170 amrestore \- extract backup images from an \fIAmanda\fR tape
173 .HP \w'\fBamrestore\fR\ 'u
174 \fBamrestore\fR [\-r | \-c | \-C] [\-b | \fIblocksize\fR] [\-f | \fIfileno\fR] [\-l | \fIlabel\fR] [\-p] [\-h] \fItapedevice\fR|\ \fIholdingfile\fR [\fIhostname\fR [\fIdiskname\fR [\fIdatestamp\fR [\fIhostname\fR [\fIdiskname\fR [\fIdatestamp\fR | \&.\&.\&.]]]]]]
179 extracts backup images from the tape mounted on
181 or from the holding disk file
188 patterns given on the command line\&. The tape or holding file must be in a format written by the
196 is not specified, all backups on the tape for the previous
200 is not specified, all backups on the tape for the previous
204 are candidates\&. If no
209 are specified, every backup on the tape is a candidate\&.
214 are special expressions described in the "HOST & DISK EXPRESSION" section of
217 are special expression described in the "DATESTAMP EXPRESSION" section of
218 \fBamanda\fR(8)\&. For example, if
220 is "rz[23]a", it would match disks
228 writes multiple backup runs to a single tape\&.
232 is used, candidate backup images are extracted to files in the current directory named:
234 \fIhostname\&.diskname\&.datestamp\&.dumplevel\fR
236 Amrestore doesn\'t use a changer, it restore from the tape already loaded in the
242 Set the blocksize used to read the tape or holding file\&. All holding files must be read with a blocksize of 32 KBytes\&.
244 should normally be able to determine the blocksize for tapes on its own and not need this parameter\&.
247 The default is 32 KBytes\&.
251 Do a rewind followed by a fsf <fileno> before trying to restore an image\&.
256 Check if we restoring from the tape with the right
262 Pipe output\&. The first matching backup image is sent to standard output, which is normally a pipe to
267 quits\&. It may be run again to continue selecting backups to process\&. Make sure you specify the no\-rewind
274 may report "short read" errors when reading from a pipe\&. Most versions of
276 support a blocking factor option to let you set the read block size, and you should set it to 2\&. See the example below\&.
280 Compress output using the fastest method the compression program provides\&.
282 normally writes output files in a format understood by
285 \fBtar\fR, even if the backups on the tape are compressed\&. With the
291 writes all files in compressed format, even if the backups on the tape are not compressed\&. Output file names will have a
295 extension depending on whether
299 is the preferred compression program\&. This option is useful when the current directory disk is small\&.
304 Compress output using the best method the compression program provides (may be very CPU intensive)\&. See the notes above about the
311 Raw output\&. Backup images are output exactly as they are on the tape, including the
313 headers\&. Output file names will have a
315 extension\&. This option is only useful for debugging and other strange circumstances\&.
320 Header output\&. The tape header block is output at the beginning of each file\&. This is like
326 may also be used to compress the result\&.
328 uses the header to determine the restore program to use\&.
331 If a header is written (\-r or \-h), only 32 KBytes are output regardless of the tape blocksize\&. This makes the resulting image usable as a holding file\&.
333 \fB\-o\fR \fIconfigoption\fR
335 See the "\fBCONFIGURATION OVERRIDE\fR" section in
340 The following does an interactive restore of disk
343 \fIseine\fR, to restore particular files\&. Note the use of the
346 \fBrestore\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\&.
357 .BB lightgray adjust-for-leading-newline
360 % amrestore \-p /dev/nrmt9 seine rz3g | restore \-ivbf 2 \-
361 .EB lightgray adjust-for-leading-newline
372 The next example extracts all backup images for host
373 \fIseine\fR\&. This is the usual way to extract all data for a host after a disk crash\&.
384 .BB lightgray adjust-for-leading-newline
387 % amrestore /dev/nrmt9 seine
388 .EB lightgray adjust-for-leading-newline
399 If the backup datestamp in the above example is
403 has level 0 backups of disks
407 on the tape, these files will be created in the current directory:
418 .BB lightgray adjust-for-leading-newline
421 seine\&.rz1a\&.19910125\&.0
422 seine\&.rz1g\&.19910125\&.0
423 .EB lightgray adjust-for-leading-newline
436 to extract a backup image from a holding disk file that has not yet been flushed to tape:
447 .BB lightgray adjust-for-leading-newline
450 % amrestore \-p /amanda/20001119/seine\&.rz1a\&.2 | restore \-ivbf 2 \-
451 .EB lightgray adjust-for-leading-newline
463 may be used to generate a listing of images on a tape:
474 .BB lightgray adjust-for-leading-newline
477 % mt \-f /dev/nrmt9 rewind
478 % amrestore \-p /dev/nrmt9 no\-such\-host > /dev/null
479 .EB lightgray adjust-for-leading-newline
492 to find images for host
493 \fBno\-such\-host\fR\&. It will not find any entries that match, but along the way will report each image it skips\&.
497 must be used to restore files from backup images created with the GNUTAR dumptype\&. Vendor tar programs sometimes fail to read GNU tar images\&.
505 : http://wiki.zmanda.com
508 \fBJames da Silva\fR <\&jds@amanda\&.org\&>
510 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>