1AMRESTORE(8) System Administration Commands AMRESTORE(8)
2
3
4
6 amrestore - extract backup images from an Amanda tape
7
9 amrestore [-r | -c | -C] [-b | blocksize] [-f | fileno] [-l | label]
10 [-p] [-h] tapedevice| holdingfile [hostname [diskname
11 [datestamp [hostname [diskname [datestamp | ...]]]]]]
12
14 Amrestore extracts backup images from the tape mounted on tapedevice or
15 from the holding disk file holdingfile that match hostname, diskname
16 and datestamp patterns given on the command line. The tape or holding
17 file must be in a format written by the amdump or amflush program.
18
19 If diskname is not specified, all backups on the tape for the previous
20 hostname are candidates. If datestamp is not specified, all backups on
21 the tape for the previous hostname and diskname are candidates. If no
22 hostname, diskname or datestamp are specified, every backup on the tape
23 is a candidate.
24
25 Hostname and diskname are special expressions described in the "HOST &
26 DISK EXPRESSION" section of amanda(8). Datestamp are special
27 expression described in the "DATESTAMP EXPRESSION" section of
28 amanda(8). For example, if diskname is "rz[23]a", it would match disks
29 rz2a and rz3a.
30
31 Datestamp is useful if amflush writes multiple backup runs to a single
32 tape.
33
34 Unless -p is used, candidate backup images are extracted to files in
35 the current directory named:
36
37 hostname.diskname.datestamp.dumplevel
38
39 Amrestore doesn´t use a changer, it restore from the tape already
40 loaded in the tapedevice.
41
43 -b
44 Set the blocksize used to read the tape or holding file. All
45 holding files must be read with a blocksize of 32 KBytes.
46 Amrestore should normally be able to determine the blocksize for
47 tapes on its own and not need this parameter.
48
49 The default is 32 KBytes.
50
51 -f
52 Do a rewind followed by a fsf <fileno> before trying to restore an
53 image.
54
55 -l
56 Check if we restoring from the tape with the right label
57
58 -p
59 Pipe output. The first matching backup image is sent to standard
60 output, which is normally a pipe to restore or tar, then amrestore
61 quits. It may be run again to continue selecting backups to
62 process. Make sure you specify the no-rewind tapedevice when doing
63 this.
64
65 Note: restore may report "short read" errors when reading from a pipe.
66 Most versions of restore support a blocking factor option to let you
67 set the read block size, and you should set it to 2. See the example
68 below.
69
70 -c
71 Compress output using the fastest method the compression program
72 provides. Amrestore normally writes output files in a format
73 understood by restore or tar, even if the backups on the tape are
74 compressed. With the -c or -C option, amrestore writes all files in
75 compressed format, even if the backups on the tape are not
76 compressed. Output file names will have a .Z or .gz extension
77 depending on whether compress or gzip is the preferred compression
78 program. This option is useful when the current directory disk is
79 small.
80
81 -C
82 Compress output using the best method the compression program
83 provides (may be very CPU intensive). See the notes above about the
84 -c option.
85
86 -r
87 Raw output. Backup images are output exactly as they are on the
88 tape, including the amdump headers. Output file names will have a
89 .RAW extension. This option is only useful for debugging and other
90 strange circumstances.
91
92 -h
93 Header output. The tape header block is output at the beginning of
94 each file. This is like -r except -c or -C may also be used to
95 compress the result. Amrecover uses the header to determine the
96 restore program to use.
97
98 If a header is written (-r or -h), only 32 KBytes are output regardless
99 of the tape blocksize. This makes the resulting image usable as a
100 holding file.
101
102 -o configoption
103 See the "CONFIGURATION OVERRIDE" section in amanda(8).
104
106 The following does an interactive restore of disk rz3g from host seine,
107 to restore particular files. Note the use of the b option to restore,
108 which causes it to read in units of two 512-byte blocks (1 Kbyte) at a
109 time. This helps keep it from complaining about short reads.
110
111 % amrestore -p /dev/nrmt9 seine rz3g | restore -ivbf 2 -
112
113 The next example extracts all backup images for host seine. This is the
114 usual way to extract all data for a host after a disk crash.
115
116 % amrestore /dev/nrmt9 seine
117
118 If the backup datestamp in the above example is 19910125 and seine has
119 level 0 backups of disks rz1a and rz1g on the tape, these files will be
120 created in the current directory:
121
122 seine.rz1a.19910125.0
123 seine.rz1g.19910125.0
124
125 You may also use amrestore to extract a backup image from a holding
126 disk file that has not yet been flushed to tape:
127
128 % amrestore -p /amanda/20001119/seine.rz1a.2 | restore -ivbf 2 -
129
130 Amrestore may be used to generate a listing of images on a tape:
131
132 % mt -f /dev/nrmt9 rewind
133 % amrestore -p /dev/nrmt9 no-such-host > /dev/null
134
135 This asks amrestore to find images for host no-such-host. It will not
136 find any entries that match, but along the way will report each image
137 it skips.
138
140 GNU-tar must be used to restore files from backup images created with
141 the GNUTAR dumptype. Vendor tar programs sometimes fail to read GNU tar
142 images.
143
145 amanda(8), amdump(8), amflush(8), tar(1), restore(8), :
146 http://wiki.zmanda.com
147
149 James da Silva <jds@amanda.org>
150
151 Stefan G. Weichinger <sgw@amanda.org>
152
153
154
155Amanda 2.6.1p2 11/05/2009 AMRESTORE(8)