X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=man%2Famrestore.8;h=24fdfb8eb731a26a1ad654d6ea89393d9702c4a1;hb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;hp=a51961fbf2b04f75509bf9ae4689e479f2ab5752;hpb=3ab887b9bc819a846c75dd7f2ee5d41fac22b19f;p=debian%2Famanda diff --git a/man/amrestore.8 b/man/amrestore.8 index a51961f..24fdfb8 100644 --- a/man/amrestore.8 +++ b/man/amrestore.8 @@ -1,321 +1,176 @@ +'\" t +.\" Title: amrestore +.\" Author: James da Silva +.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 +.\" Date: 06/02/2011 +.\" Manual: System Administration Commands +.\" Source: Amanda 3.3.0 +.\" Language: English .\" -.de EX -.if t .ft C -.nf -.. -.de EE -.fi -.if t .ft -.. -.TH AMRESTORE 8 -.SH NAME -amrestore \- extract backup images from an Amanda tape -.SH SYNOPSIS -.B amrestore -[ -.B \-r -| -.B \-c -| -.B \-C -] -[ -.B \-b -.I blocksize -] -[ -.B \-f -.I fileno -] -[ -.B \-l -.I label -] -[ -.B \-p -] -[ -.B \-h -] -.I tapedevice -| -.I holdingfile -[ -.I hostname -[ -.I diskname -[ -.I datestamp -[ -.I hostname -[ -.I diskname -[ -.I datestamp -\&... -]]]]]] -.SH DESCRIPTION -.B Amrestore -extracts backup images from the tape mounted on -.I tapedevice -or from the holding disk file -.I holdingfile -that match -.IR hostname , -.I diskname -and -.I datestamp -patterns given on the command line. -The tape or holding file must be in a format written by the -.B amdump -or -.B amflush -program. -.LP -If -.I diskname -is not specified, all backups on the tape for the previous -.I hostname -are candidates. -If -.I datestamp -is not specified, all backups on the tape for the previous -.I hostname +.TH "AMRESTORE" "8" "06/02/2011" "Amanda 3\&.3\&.0" "System Administration Commands" +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +amrestore \- low\-level data\-extraction from Amanda volumes +.SH "SYNOPSIS" +.HP \w'\fBamrestore\fR\ 'u +\fBamrestore\fR [\-\-config\ \fIconfig\fR] [\-r | \-c | \-C] [\-b\ \fIblocksize\fR] [\-f\ \fIfilenum\fR] [\-l\ \fIlabel\fR] [\-p] [\-h] [\fB\-o\fR\ \fIconfigoption\fR...] [{\fIchangerspec\fR} | {[\-\-holding]\ \fIholdingfile\fR}] [\fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ [\ \fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ \&.\&.\&.\ ]\ ]\ ]\ ]\ ]] +.PP +Note that this is the only Amanda command which does not take a configuration name as its first argument\&. +.SH "DESCRIPTION" +.PP +\fIAmrestore\fR +is a very low\-level tool for extracting data from Amanda volumes\&. It does not consult any catalog information or other metadata, basing its operations only on the headers found on the volume\&. This makes it an appropriate tool for bare\-metal restores of an Amanda server, or other situations where the catalog is not available\&. +.PP +See +\fBamfetchdump\fR(8) and -.I diskname -are candidates. -If no -.IR hostname , -.I diskname +\fBamrecover\fR(8) +for higher\-level recoveries\&. +.PP +The tool does not reassemble split dumps, but can uncompress compressed dumps\&. Note that decompression may fail for split parts after the first\&. If this occurs, extract the parts without decompressing, concatenate them, and decompress the result\&. +.PP +Data is restored from the current volume in +\fIchangerspec\fR, or from the holding file +\fIholdingfile\fR\&. In most cases, +\fIchangerspec\fR +will name a particular device, e\&.g\&., +tape:/dev/nst0 or -.I datestamp -are specified, every backup on the tape is a candidate. -.LP -.I Hostname -and -.I diskname -are special expression descibe in the "HOST & DISK EXPRESSION" section -of -.IR amanda (8). -.I Datestamp -are special expression describe in the "DATESTAMP EXPRESSION" section -of -.IR amanda (8). -For example, if -.I diskname -is "rz[23]a", it would match disks -.B rz2a -and -.BR rz3a . -.LP -.I Datestamp -is useful if -.B amflush -writes multiple backup runs to a single tape. +s3:mybucket/tape\-1\&. +.PP +Only dumps matching the dump specification beginning with +\fIhostname\fR +are extracted\&. If no specification is given, every file on the volume (or the entire holdingfile) is restored\&. See the "DUMP SPECIFICATIONS" section of +\fBamanda-match\fR(7) +for more information\&. .PP Unless -.B \-p -is used, -candidate backup images are extracted to files -in the current directory named: -.LP -.RS -.I hostname.diskname.datestamp.dumplevel +\fB\-p\fR +is used, candidate backup images are extracted to files in the current directory named: +hostname\&.diskname\&.datestamp\&.dumplevel +.SH "OPTIONS" +.PP +\fB\-b \fR\fB\fIblocksize\fR\fR +.RS 4 +Use the given blocksize to read the volume\&. The default is defined by the device\&. .RE .PP -Amrestore doesn't use a changer, it restore from the tape already loaded -in the -.I tapedevice. -.SH OPTIONS -.TP -.B \-b -Set the blocksize used to read the tape or holding file. -All holding files must be read with a blocksize of 32 KBytes. -.B Amrestore -should normally be able to determine the blocksize for tapes -on its own and not need this parameter. -.IP -The default is 32 KBytes. -.TP -.B \-f -Do a rewind followed by a fsf before trying to restore an image. -.TP -.B \-l -Check if we restoring from the tape with the right -.I label -.TP -.B \-p -Pipe output. -The first matching backup image is sent to standard output, -which is normally a pipe to -.B restore -or -.BR tar , -then -.B amrestore -quits. -It may be run again to continue selecting backups to process. -Make sure you specify the no-rewind -.I tapedevice -when doing this. -.IP -Note: -.B restore -may report "short read" errors when reading from a pipe. -Most versions of -.B restore -support a blocking factor option to let you set the read block size, -and you should set it to 2. -See the example below. -.TP -.B \-c -Compress output using the fastest method the compression program provides. -.B Amrestore -normally writes output files in a format understood by -.B restore -or -.BR tar , -even if the backups on the tape are compressed. -With the -.B \-c -or -.B \-C -option, -.B amrestore -writes all files in compressed format, -even if the backups on the tape are not compressed. -Output file names will have a -.I .Z -or -.I .gz -extension depending on whether -.B compress -or -.B gzip -is the preferred compression program. -This option is useful when the current directory disk is small. -.TP -.B \-C -Compress output using the best method the compression program provides -(may be very CPU intensive). -See the notes above about the -.B \-c -option. -.TP -.B \-r -Raw output. -Backup images are output exactly as they are on the tape, -including the -.B amdump -headers. -Output file names will have a -.I .RAW -extension. -This option is only useful for debugging and other strange circumstances. -.TP -.B \-h -Header output. -The tape header block is output at the beginning of each file. -This is like -.B \-r -except -.B \-c -or -.B \-C -may also be used to compress the result. -.B Amrecover -uses the header to determine the restore program to use. -.LP -If a header is written (\-r or \-h), -only 32 KBytes are output regardless of the tape blocksize. -This makes the resulting image usable as a holding file. -.SH EXAMPLES +\fB\-f \fR\fB\fIfilenum\fR\fR +.RS 4 +Seek to file +\fIfilenum\fR +before beginning the restore operation\&. +.RE +.PP +\fB\-l \fR\fB\fIlabel\fR\fR +.RS 4 +Check that the volume has label +\fIlabel\fR\&. +.RE +.PP +\fB\-p\fR +.RS 4 +Pipe the first matching file to standard output\&. This is typically used in a shell pipeline to send the data to a process like +\fBtar\fR +for extraction\&. +.RE +.PP +\fB\-c\fR, \fB\-C\fR +.RS 4 +If the file is not already compressed, compress it using the fastest (\fB\-c\fR) or best (\fB\-C\fR) compression algorithm\&. Note that +\fBamrestore\fR +will not re\-compress an already\-compressed file\&. Without either of these options, +\fBamrestore\fR +will automatically uncompress any compressed files\&. This option is useful when the destination disk is small\&. +.RE +.PP +\fB\-h\fR +.RS 4 +Include 32k headers on all output files, similar to a holding file\&. This header can be read by another application or utility (see +\fBAmanda::Header\fR) during the next phase of processing\&. +.RE +.PP +\fB\-r\fR +.RS 4 +Output raw files\&. This is similar to +\fB\-h\fR, but also disables any automatic decompression\&. Output file names will have a +\&.RAW +extension\&. +.RE +.PP +\fB\-o \fR\fB\fIconfigoption\fR\fR +.RS 4 +See the "CONFIGURATION OVERRIDE" section in +\fBamanda\fR(8)\&. +.RE +.SH "EXAMPLES" +.PP The following does an interactive restore of disk -.I rz3g +\fIrz3g\fR from host -.IR seine , -to restore particular files. -Note the use of the -.B b +\fIseine\fR, to restore particular files\&. Note the use of the +\fIb\fR option to -.BR restore , -which causes it to read in units of two 512-byte blocks (1 Kbyte) -at a time. -This helps keep it from complaining about short reads. -.LP -.RS -.EX -% amrestore \-p /dev/nrmt9 seine rz3g | restore \-ivbf 2 \- -.EE -.RE -.LP +\fIrestore\fR, which causes it to read in units of two 512\-byte blocks (1 Kbyte) at a time\&. This helps keep it from complaining about short reads\&. +.nf + amrestore \-p /dev/nrmt9 seine rz3g | tar \-xv +.fi +.PP The next example extracts all backup images for host -.IR seine . -This is the usual way to extract all data for a host after a disk crash. -.LP -.RS -.EX -% amrestore /dev/nrmt9 seine -.EE -.RE -.LP +\fIseine\fR\&. This is a typical way to extract all data for a host after a disk crash\&. +.nf + amrestore /dev/nrmt9 seine +.fi +.PP If the backup datestamp in the above example is -.I 19910125 +20070125 and -.I seine +\fIseine\fR has level 0 backups of disks -.I rz1a +\fIrz1a\fR and -.I rz1g -on the tape, -these files will be created in the current directory: -.LP -.RS -.EX -seine.rz1a.19910125.0 -seine.rz1g.19910125.0 -.EE -.RE -.LP +\fIrz1g\fR +on the tape, these files will be created in the current directory: +.nf + seine\&.rz1a\&.19910125\&.0 + seine\&.rz1g\&.19910125\&.0 +.fi +.PP You may also use -.B amrestore -to extract a backup image from a holding disk -file that has not yet been flushed to tape: -.LP -.RS -.EX -% amrestore \-p /amanda/20001119/seine.rz1a.2 | restore \-ivbf 2 \- -.EE -.RE -.LP -.B Amrestore -may be used to generate a listing of images on a tape: -.LP -.RS -.EX -% mt -f /dev/nrmt9 rewind -% amrestore \-p /dev/nrmt9 no-such-host > /dev/null -.EE -.RE -.LP -This asks -.B amrestore -to find images for host -.BR no-such-host . -It will not find any entries that match, but along the way will report -each image it skips. -.SH CAVEATS -.LP -GNU tar must be used to restore files from backup images created with -the GNUTAR dumptype. -Vendor tar programs sometimes fail to read GNU tar images. -.SH AUTHOR -James da Silva -.br -University of Maryland, College Park +\fBamrestore\fR +to extract a backup image from a holding disk file that has not yet been flushed to tape: +.nf + amrestore \-p /amanda/20001119/seine\&.rz1a\&.2 | tar \-xv +.fi +.SH "CAVEATS" +.PP +\fBGNU\-tar\fR +must be used to restore files from backup images created with the GNUTAR dumptype\&. Vendor tar programs sometimes fail to read GNU Tar images\&. .SH "SEE ALSO" -amanda(8), -amdump(8), -amflush(8), -tar(1) -restore(8) +.PP +\fBamanda\fR(8), +\fBamanda-match\fR(7), +\fBamfetchdump\fR(8), +\fBamrecover\fR(8) +.PP +The Amanda Wiki: +: http://wiki.zmanda.com/ +.SH "AUTHORS" +.PP +\fBJames da Silva\fR <\&jds@amanda\&.org\&> +.PP +\fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&> +.PP +\fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&> +.RS 4 +Zmanda, Inc\&. (http://www\&.zmanda\&.com) +.RE