1AMRESTORE(8) 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 OVERWRITE" 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
114 The next example extracts all backup images for host seine. This is the
115 usual way to extract all data for a host after a disk crash.
116
117 % amrestore /dev/nrmt9 seine
118
119
120 If the backup datestamp in the above example is 19910125 and seine has
121 level 0 backups of disks rz1a and rz1g on the tape, these files will be
122 created in the current directory:
123
124 seine.rz1a.19910125.0
125 seine.rz1g.19910125.0
126
127
128 You may also use amrestore to extract a backup image from a holding
129 disk file that has not yet been flushed to tape:
130
131 % amrestore -p /amanda/20001119/seine.rz1a.2 | restore -ivbf 2 -
132
133
134 Amrestore may be used to generate a listing of images on a tape:
135
136 % mt -f /dev/nrmt9 rewind
137 % amrestore -p /dev/nrmt9 no-such-host > /dev/null
138
139
140 This asks amrestore to find images for host no-such-host. It will not
141 find any entries that match, but along the way will report each image
142 it skips.
143
145 GNU-tar must be used to restore files from backup images created with
146 the GNUTAR dumptype. Vendor tar programs sometimes fail to read GNU tar
147 images.
148
150 James da Silva, <jds@amanda.org>, University of Maryland, College Park:
151 Original text
152
153 Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the
154 Amanda-documentation: XML-conversion
155
157 amanda(8), amdump(8), amflush(8), tar(1) restore(8)
158
159
160
161 02/07/2007 AMRESTORE(8)