Table of Contentsamrestore - extract files from an Amanda tape amrestore [ options ] tapedevice [ hostname [ diskname ]] Amrestore extracts all files from the tapedevice that match the hostname and diskname given on the command line. The tape must be in the format as written by the amdump program. If the diskname is not specified, all backups on the tape for the particular hostname are extracted. If the hostname is not specified, every backup on the tape is extracted. The hostname and diskname may be regular expressions that can match many dumps. For example, if a diskname of rz[23]a is given, it would match backups of disks rz2a and rz3a.
Matching backup files from the tape are normally extracted to files in the current directory named hostname.diskname.datestamp.dumplevel.
Amrestore supports the following options:
- -p
- Pipe output. The first matching backup file is sent to the standard output file descriptor (which is normally a pipe to restore), then amrestore quits. It may be run again to continue sending successive files to restore. Make sure you specify the no-rewind version of the tapedevice when doing this.
- NOTE:
- restore can report "short read" errors when reading from a pipe. Most versions of restore support a blocking factor option to let the user set the read block size. See the example below.
- -c
- Compressed output. Amrestore normally writes its output files in the format understood by restore, even if the backup files on the tape are in compressed format. With the -c option, amrestore will write all files in compressed format, even if the backup files on the tape are not compressed. The output file names will have the .Z extension appended to them. This option is very useful when the holding disk is small.
- -r
- Raw output. The backup files are output exactly as they are on the tape, including the amdump file headers. The output file names will have the .RAW extension appended to them. This option is only useful for debugging and other strange circumstances.
- % amrestore -p /dev/nrmt9 seine rz3g | restore ivbf 2 -
- This does an interactive restore of disk /dev/rz3g from host seine, to restore particular files. Note the use of the "b 2" option to restore, which means read in units of 2 512-byte blocks (== 1 Kbyte) at a time. This keeps restore from complaining about short reads.
- % amrestore /dev/nrmt9 seine
- This extracts all backup files for host seine. This is the usual way to extract all the data for a host after a disk crash. If the datestamp for the backups is 19910125 and seine has level 0 backups of filesystems rz1a and rz1g on the tape; the following files will be created in the current directory: seine.rz1a.19910125.0
seine.rz1g.19910125.0
James da Silva <jds@cs.umd.edu>
University of Maryland, College Park
amanda(8), amdump(8), amflush(8), restore(8).
Table of Contents
www.fiveanddime.net