3 Prev Chapter 36. The Amanda Manual Pages. Next
5 -------------------------------------------------------------------------------
9 amrestore
\14 extract backup images from an Amanda tape
13 amrestore [ -r | -c | -C ] [ -b | blocksize ] [ -f | fileno ] [ -l | label ] [-
14 p] [-h] tapedevice | holdingfile [ hostname [ diskname [ datestamp [ hostname
15 [ diskname [ datestamp | ... ]]]]]]
19 Amrestore extracts backup images from the tape mounted on tapedevice or from
20 the holding disk file holdingfile that match hostname, diskname and datestamp
21 patterns given on the command line. The tape or holding file must be in a
22 format written by the amdump or amflush program.
23 If diskname is not specified, all backups on the tape for the previous hostname
24 are candidates. If datestamp is not specified, all backups on the tape for the
25 previous hostname and diskname are candidates. If no hostname, diskname or
26 datestamp are specified, every backup on the tape is a candidate.
27 Hostname and diskname are special expressions described in the "HOST & DISK
28 EXPRESSION" section of amanda(8). Datestamp are special expression described in
29 the "DATESTAMP EXPRESSION" section of amanda(8). For example, if diskname is
30 "rz[23]a", it would match disks rz2a and rz3a.
31 Datestamp is useful if amflush writes multiple backup runs to a single tape.
32 Unless -p is used, candidate backup images are extracted to files in the
33 current directory named:
34 hostname.diskname.datestamp.dumplevel
35 Amrestore doesn't use a changer, it restore from the tape already loaded in the
43 Set the blocksize used to read the tape or holding file. All holding
44 files must be read with a blocksize of 32 KBytes. Amrestore should
45 normally be able to determine the blocksize for tapes on its own and not
48 The default is 32 KBytes.
52 Do a rewind followed by a fsf <fileno> before trying to restore an image.
55 Check if we restoring from the tape with the right label
58 Pipe output. The first matching backup image is sent to standard output,
59 which is normally a pipe to restore or tar, then amrestore quits. It may
60 be run again to continue selecting backups to process. Make sure you
61 specify the no-rewind tapedevice when doing this.
63 Note: restore may report "short read" errors when reading from a pipe. Most
64 versions of restore support a blocking factor option to let you set the read
65 block size, and you should set it to 2. See the example below.
69 Compress output using the fastest method the compression program
70 provides. Amrestore normally writes output files in a format understood
71 by restore or tar, even if the backups on the tape are compressed. With
72 the -c or -C option, amrestore writes all files in compressed format,
73 even if the backups on the tape are not compressed. Output file names
74 will have a .Z or .gz extension depending on whether compress or gzip is
75 the preferred compression program. This option is useful when the current
76 directory disk is small.
79 Compress output using the best method the compression program provides
80 (may be very CPU intensive). See the notes above about the -c option.
83 Raw output. Backup images are output exactly as they are on the tape,
84 including the amdump headers. Output file names will have a .RAW
85 extension. This option is only useful for debugging and other strange
89 Header output. The tape header block is output at the beginning of each
90 file. This is like -r except -c or -C may also be used to compress the
91 result. Amrecover uses the header to determine the restore program to
94 If a header is written (-r or -h), only 32 KBytes are output regardless of the
95 tape blocksize. This makes the resulting image usable as a holding file.
99 See the "CONFIGURATION OVERRIDE" section in amanda(8).
104 The following does an interactive restore of disk rz3g from host seine, to
105 restore particular files. Note the use of the b option to restore, which causes
106 it to read in units of two 512-byte blocks (1 Kbyte) at a time. This helps keep
107 it from complaining about short reads.
109 % amrestore -p /dev/nrmt9 seine rz3g | restore -ivbf 2 -
110 The next example extracts all backup images for host seine. This is the usual
111 way to extract all data for a host after a disk crash.
113 % amrestore /dev/nrmt9 seine
114 If the backup datestamp in the above example is 19910125 and seine has level 0
115 backups of disks rz1a and rz1g on the tape, these files will be created in the
118 seine.rz1a.19910125.0
119 seine.rz1g.19910125.0
120 You may also use amrestore to extract a backup image from a holding disk file
121 that has not yet been flushed to tape:
123 % amrestore -p /amanda/20001119/seine.rz1a.2 | restore -ivbf 2 -
124 Amrestore may be used to generate a listing of images on a tape:
126 % mt -f /dev/nrmt9 rewind
127 % amrestore -p /dev/nrmt9 no-such-host > /dev/null
128 This asks amrestore to find images for host no-such-host. It will not find any
129 entries that match, but along the way will report each image it skips.
133 GNU-tar must be used to restore files from backup images created with the
134 GNUTAR dumptype. Vendor tar programs sometimes fail to read GNU tar images.
138 James da Silva, <jds@amanda.org>, University of Maryland, College Park:
140 Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the Amanda-documentation:
145 amanda(8), amdump(8), amflush(8), tar(1) restore(8)
146 -------------------------------------------------------------------------------
149 amreport Home amrmtape