📄 amrestore.8
字号:
.\" Title: amrestore.\" Author: .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>.\" Date: 05/13/2008.\" Manual: .\" Source: .\".TH "AMRESTORE" "8" "05/13/2008" "" "".\" disable hyphenation.nh.\" disable justification (adjust text to left margin only).ad l.SH "NAME"amrestore - extract backup images from an Amanda tape.SH "SYNOPSIS".HP 10\fBamrestore\fR [\-r | \-c | \-C] [\-b | \fIblocksize\fR] [\-f | \fIfileno\fR] [\-l | \fIlabel\fR] [\-p] [\-h] \fItapedevice\fR|\ \fIholdingfile\fR [\fIhostname\fR [\fIdiskname\fR [\fIdatestamp\fR [\fIhostname\fR [\fIdiskname\fR [\fIdatestamp\fR | \.\.\.]]]]]].SH "DESCRIPTION".PP\fBAmrestore\fRextracts backup images from the tape mounted on\fItapedevice\fRor from the holding disk file\fIholdingfile\fRthat match\fIhostname\fR,\fIdiskname\fRand\fIdatestamp\fRpatterns given on the command line\. The tape or holding file must be in a format written by the\fBamdump\fRor\fBamflush\fRprogram\..PPIf\fIdiskname\fRis not specified, all backups on the tape for the previous\fIhostname\fRare candidates\. If\fIdatestamp\fRis not specified, all backups on the tape for the previous\fIhostname\fRand\fIdiskname\fRare candidates\. If no\fIhostname\fR,\fIdiskname\fRor\fIdatestamp\fRare specified, every backup on the tape is a candidate\..PP\fIHostname\fRand\fIdiskname\fRare special expressions described in the "HOST & DISK EXPRESSION" section of\fBamanda\fR(8)\.\fIDatestamp\fRare special expression described in the "DATESTAMP EXPRESSION" section of\fBamanda\fR(8)\. For example, if\fIdiskname\fRis "rz[23]a", it would match disks\fBrz2a\fRand\fBrz3a\fR\..PP\fIDatestamp\fRis useful if\fBamflush\fRwrites multiple backup runs to a single tape\..PPUnless\fB\-p\fRis used, candidate backup images are extracted to files in the current directory named:.PP\fIhostname\.diskname\.datestamp\.dumplevel\fR.PPAmrestore doesn\'t use a changer, it restore from the tape already loaded in the\fItapedevice\.\fR.SH "OPTIONS".PP\fB\-b\fR.RS 4Set the blocksize used to read the tape or holding file\. All holding files must be read with a blocksize of 32 KBytes\.\fBAmrestore\fRshould normally be able to determine the blocksize for tapes on its own and not need this parameter\..RE.PPThe default is 32 KBytes\..PP\fB\-f\fR.RS 4Do a rewind followed by a fsf <fileno> before trying to restore an image\..RE.PP\fB\-l\fR.RS 4Check if we restoring from the tape with the right\fIlabel\fR.RE.PP\fB\-p\fR.RS 4Pipe output\. The first matching backup image is sent to standard output, which is normally a pipe to\fBrestore\fRor\fBtar\fR, then\fBamrestore\fRquits\. It may be run again to continue selecting backups to process\. Make sure you specify the no\-rewind\fItapedevice\fRwhen doing this\..RE.PPNote:\fBrestore\fRmay report "short read" errors when reading from a pipe\. Most versions of\fBrestore\fRsupport a blocking factor option to let you set the read block size, and you should set it to 2\. See the example below\..PP\fB\-c\fR.RS 4Compress output using the fastest method the compression program provides\.\fBAmrestore\fRnormally writes output files in a format understood by\fBrestore\fRor\fBtar\fR, even if the backups on the tape are compressed\. With the\fB\-c\fRor\fB\-C\fRoption,\fBamrestore\fRwrites all files in compressed format, even if the backups on the tape are not compressed\. Output file names will have a\fB\.Z\fRor\fB\.gz\fRextension depending on whether\fBcompress\fRor\fBgzip\fRis the preferred compression program\. This option is useful when the current directory disk is small\..RE.PP\fB\-C\fR.RS 4Compress output using the best method the compression program provides (may be very CPU intensive)\. See the notes above about the\fB\-c\fRoption\..RE.PP\fB\-r\fR.RS 4Raw output\. Backup images are output exactly as they are on the tape, including the\fBamdump\fRheaders\. Output file names will have a\fB\.RAW\fRextension\. This option is only useful for debugging and other strange circumstances\..RE.PP\fB\-h\fR.RS 4Header output\. The tape header block is output at the beginning of each file\. This is like\fB\-r\fRexcept\fB\-c\fRor\fB\-C\fRmay also be used to compress the result\.\fBAmrecover\fRuses the header to determine the restore program to use\..RE.PPIf 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\..PP\fB\-o\fR \fIconfigoption\fR.RS 4See the "\fBCONFIGURATION OVERRIDE\fR" section in\fBamanda\fR(8)\..RE.SH "EXAMPLES".PPThe following does an interactive restore of disk\fIrz3g\fRfrom host\fIseine\fR, to restore particular files\. Note the use of the\fBb\fRoption to\fBrestore\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\..sp.RS 4.nf% amrestore \-p /dev/nrmt9 seine rz3g | restore \-ivbf 2 \-.fi.RE.PPThe next example extracts all backup images for host\fIseine\fR\. This is the usual way to extract all data for a host after a disk crash\..sp.RS 4.nf% amrestore /dev/nrmt9 seine.fi.RE.PPIf the backup datestamp in the above example is19910125and\fIseine\fRhas level 0 backups of disks\fIrz1a\fRand\fIrz1g\fRon the tape, these files will be created in the current directory:.sp.RS 4.nfseine\.rz1a\.19910125\.0seine\.rz1g\.19910125\.0.fi.RE.PPYou may also use\fBamrestore\fRto extract a backup image from a holding disk file that has not yet been flushed to tape:.sp.RS 4.nf% amrestore \-p /amanda/20001119/seine\.rz1a\.2 | restore \-ivbf 2 \-.fi.RE.PP\fBAmrestore\fRmay be used to generate a listing of images on a tape:.sp.RS 4.nf% mt \-f /dev/nrmt9 rewind% amrestore \-p /dev/nrmt9 no\-such\-host > /dev/null.fi.RE.PPThis asks\fBamrestore\fRto find images for host\fBno\-such\-host\fR\. It will not find any entries that match, but along the way will report each image it skips\..SH "CAVEATS".PP\fBGNU\-tar\fRmust 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".PPJames da Silva,<jds@amanda\.org>, University of Maryland, College Park: Original text.PPStefan G\. Weichinger,<sgw@amanda\.org>, maintainer of the\fIAmanda\fR\-documentation: XML\-conversion.SH "SEE ALSO".PP\fBamanda\fR(8),\fBamdump\fR(8),\fBamflush\fR(8),\fBtar\fR(1),\fBrestore\fR(8),\fI\%http://wiki.zmanda.com\fR
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -