Imported Upstream version 2.5.2p1
[debian/amanda] / docs / amrestore.8.txt
1
2                              amrestore
3 Prev  Chapter 36. The Amanda Manual Pages.  Next
4
5 -------------------------------------------------------------------------------
6
7 Name
8
9 amrestore \14 extract backup images from an Amanda tape
10
11 Synopsis
12
13 amrestore [ -r | -c | -C ] [ -b | blocksize ] [ -f | fileno ] [ -l | label ] [-
14 p] [-h] tapedevice | holdingfile [ hostname [ diskname [ datestamp [ hostname
15 [ diskname [ datestamp | ... ]]]]]]
16
17 DESCRIPTION
18
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
36 tapedevice.
37
38 OPTIONS
39
40
41
42   -b
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
46       need this parameter.
47
48 The default is 32 KBytes.
49
50
51   -f
52       Do a rewind followed by a fsf <fileno> before trying to restore an image.
53
54   -l
55       Check if we restoring from the tape with the right label
56
57   -p
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.
62
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.
66
67
68   -c
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.
77
78   -C
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.
81
82   -r
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
86       circumstances.
87
88   -h
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
92       use.
93
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.
96
97
98   -o configoption
99       See the "CONFIGURATION OVERRIDE" section in amanda(8).
100
101
102 EXAMPLES
103
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.
108
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.
112
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
116 current directory:
117
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:
122
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:
125
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.
130
131 CAVEATS
132
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.
135
136 AUTHOR
137
138 James da Silva, <jds@amanda.org>, University of Maryland, College Park:
139 Original text
140 Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the Amanda-documentation:
141 XML-conversion
142
143 SEE ALSO
144
145 amanda(8), amdump(8), amflush(8), tar(1) restore(8)
146 -------------------------------------------------------------------------------
147
148 Prev       Up       Next
149 amreport  Home  amrmtape
150