📄 amrecover.8
字号:
.\" Title: amrecover.\" Author: .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>.\" Date: 05/13/2008.\" Manual: .\" Source: .\".TH "AMRECOVER" "8" "05/13/2008" "" "".\" disable hyphenation.nh.\" disable justification (adjust text to left margin only).ad l.SH "NAME"amrecover - Amanda index database browser.SH "SYNOPSIS".HP 10\fBamrecover\fR [\-C\ \fIconfig\fR] [\-s\ \fIindex\-server\fR] [\-t\ \fItape\-server\fR] [\-d\ \fItape\-device\fR] [\-o\ \fIconfigoption\fR]....SH "DESCRIPTION".PP\fBAmrecover\fRbrowses the database of\fIAmanda\fRindex files to determine which tapes contain files to recover\. Furthermore, it is able to recover files\..PPIn order to restore files in place, you must invoke\fBamrecover\fRfrom the root of the backed up filesystem, or use\fBlcd\fRto move into that directory, otherwise a directory tree that resembles the backed up filesystem will be created in the current directory\. See the examples below for details\..PPAmrecover will read the\fBamanda\-client\.conf\fRfile and the\fIconfig\fR\fB/amanda\-client\.conf\fRfile\..PPSee the\fBamanda\fR(8)man page for more details about\fIAmanda\fR\..SH "OPTIONS".sp.it 1 an-trap.nr an-no-space-flag 1.nr an-break-flag 1.brNote.PPThe Default values are those set at compile\-time\. Use\fBamrestore\fRto recover client\-encrypted or client\-custom\-compressed tapes\..PP\fB[ \-C ] config\fR.RS 4\fIAmanda\fRconfiguration\..RE.PP\fB\-s index\-server\fR.RS 4Host that runs the index daemon\..RE.PP\fB\-t tape\-server\fR.RS 4Host that runs the tape server daemon\..RE.PP\fB\-d tape\-device\fR.RS 4Tape device to use on the tape server host\..RE.PP\fB\-o\fR \fIclientconfigoption\fR.RS 4See the "\fBCONFIGURATION OVERRIDE\fR" section in\fBamanda\fR(8)\..RE.SH "COMMANDS".PP\fBAmrecover\fRconnects to the index server and then presents a command line prompt\. Usage is similar to an ftp client\. The GNU readline library is used to provide command line history and editing if it was built in to\fBamrecover\fR\..PPThe purpose of browsing the database is to build up a\fIrestore list\fRof files to be extracted from the backup system\. The following commands are available:.PP\fBsethost hostname\fR.RS 4Specifies which host to look at backup files for (default: the local host)\..RE.PP\fBsetdate YYYY\-MM\-DD\-HH\-MM[\-SS] | YYYY\-MM\-DD\fR.RS 4Set the restore time (default: now)\. File listing commands only return information on backup images for this day, for the day before with the next lower dump level, and so on, until the most recent level 0 backup on or before the specified date is encountered\..spFor example, if:.sp.RS 4.nf1996\-07\-01 was a level 0 backup1996\-07\-02 through 1996\-07\-05 were level 1 backups1996\-07\-06 through 1997\-07\-08 were level 2 backups.fi.RE.spthen the command\fBsetdate 1997\-07\-08\-00\fRwould yield files from the following days:.sp.RS 4.nf1997\-07\-08 (the latest level 2 backup)1997\-07\-05 (the latest level 1 backup)1997\-07\-01 (the latest level 0 backup).fi.RE.spOnly the most recent version of a file will be presented\..spThe following abbreviated date specifications are accepted:.PP\fB\-\-MM\-DD\fR.RS 4dates in the current year.RE.PP\fB\-\-\-DD\fR.RS 4dates in the current month of the current year.RE.RE.PP\fBsetdisk\fR \fIdiskname\fR [\fImountpoint\fR].RS 4Specifies which disk to consider (default: the disk holding the working directory where\fBamrecover\fRis started)\. It can only be set after the host is set with\fBsethost\fR\.\fIDiskname\fRis the device name specified in the\fIamanda\.conf\fRor\fIdisklist\fRconfiguration file\. The disk must be local to the host\. If\fImountpoint\fRis not specified, all pathnames will be relative to the (unknown) mount point instead of full pathnames\..RE.PP\fBlisthost\fR [\fIdiskdevice\fR].RS 4List all\fBhost\fR.RE.PP\fBlistdisk\fR [\fIdiskdevice\fR].RS 4List all\fBdiskname\fR.RE.PP\fBsetdevice\fR [[\-h \fItape\-server\fR] \fItapedev\fR].RS 4Specifies the host to use as the tape server, and which of its tape devices to use\. If the server is omitted, the server name reverts to the configure\-time default\. If the tape device is omitted, the default is used\..spIf you want amrecover to use your changer, the\fItapedev\fRmust be equal to the amrecover_changer setting on the server\..spIf you need to change the protocol (tape:, rait:, file:, null:) then you must specify the hostname\..sp.RS 4.nfsettape 192\.168\.0\.10:file:/file1.fi.REYou can change the tape device when amrecover ask you to load the tape:.sp.RS 4.nfLoad tape DMP014 nowContinue? [Y/n/t]: tTape device: server2:/dev/nst2Continue? [Y/n/t]: YUsing tape /dev/nst2 from server server2\..fi.RE.RE.PP\fBsetmode\fR \fImode\fR.RS 4Set the extraction mode for Samba shares\. If\fImode\fRis\fBsmb\fR, shares are sent to the Samba server to be restored back onto the PC\. If\fImode\fRis\fBtar\fR, they are extracted on the local machine the same way tar volumes are extracted\..RE.PP\fBmode\fR.RS 4Displays the extracting mode for Samba shares\..RE.PP\fBhistory\fR.RS 4Show the backup history of the current host and disk\. Dates, levels, tapes and file position on tape of each backup are displayed\..RE.PP\fBpwd\fR.RS 4Display the name of the current backup working directory\..RE.PP\fBcd\fR \fIdir\fR.RS 4Change the backup working directory to\fIdir\.\fRIf the mount point was specified with\fBsetdisk\fR, this can be a full pathname or it can be relative to the current backup working directory\. If the mount point was not specified, paths are relative to the mount point if they start with "/", otherwise they are relative to the current backup working directory\. The\fIdir\fRcan be a shell style wildcards\..RE.PP\fBcdx\fR \fIdir\fR.RS 4Like the\fBcd\fRcommand but allow regular expression\..RE.PP\fBlpwd\fR.RS 4Display the\fBamrecover\fRworking directory\. Files will be restored under this directory, relative to the backed up filesystem\..RE.PP\fBlcd\fR \fIpath\fR.RS 4Change the\fBamrecover\fRworking directory to\fIpath\fR\..RE.PP\fBls\fR.RS 4List the contents of the current backup working directory\. See the description of the\fBsetdate\fRcommand for how the view of the directory is built up\. The backup date is shown for each file\..RE.PP\fBadd\fR \fIitem1 item2 \.\.\.\fR.RS 4Add the specified files or directories to the restore list\. Each item may have shell style wildcards\..RE.PP\fBaddx\fR \fIitem1 item2 \.\.\.\fR.RS 4Add the specified files or directories to the restore list\. Each item may be a regular expression\..RE.PP\fBdelete\fR \fIitem1 item2 \.\.\.\fR.RS 4Delete the specified files or directories from the restore list\. Each item may have shell style wildcards\..RE.PP\fBdeletex\fR \fIitem1 item2 \.\.\.\fR.RS 4Delete the specified files or directories from the restore list\. Each item may be a regular expression\..RE.PP\fBlist\fR \fIfile\fR.RS 4Display the contents of the restore list\. If a file name is specified, the restore list is written to that file\. This can be used to manually extract the files from the\fIAmanda\fRtapes with\fBamrestore\fR\..RE.PP\fBclear\fR.RS 4Clear the restore list\..RE.PP\fBquit\fR.RS 4Close the connection to the index server and exit\..RE.PP\fBexit\fR.RS 4Close the connection to the index server and exit\..RE.PP\fBextract\fR.RS 4Start the extract sequence (see the examples below)\. Make sure the local working directory is the root of the backed up filesystem, or another directory that will behave like that\. Use\fBlpwd\fRto display the local working directory, and\fBlcd\fRto change it\..RE.PP\fBhelp\fR.RS 4Display a brief list of these commands\..RE.SH "EXAMPLES".PPThe following shows the recovery of an old\fIsyslog\fRfile\..sp.RS 4.nf# cd /var/log# ls \-l syslog\.7syslog\.7: No such file or directory# amrecoverAMRECOVER Version 2\.4\.2\. Contacting server on oops \.\.\.220 oops \fIAmanda\fR index server (2\.4\.2) ready\.Setting restore date to today (1997\-12\-09)200 Working date set to 1997\-12\-09\.200 Config set to daily\.200 Dump host set to this\-host\.some\.org\.$CWD \'/var/log\' is on disk \'/var\' mounted at \'/var\'\.200 Disk set to /var\./var/logWARNING: not on root of selected filesystem, check man\-page!amrecover> ls1997\-12\-09 daemon\.log1997\-12\-09 syslog1997\-12\-08 authlog1997\-12\-08 sysidconfig\.log1997\-12\-08 syslog\.01997\-12\-08 syslog\.11997\-12\-08 syslog\.21997\-12\-08 syslog\.31997\-12\-08 syslog\.41997\-12\-08 syslog\.51997\-12\-08 syslog\.61997\-12\-08 syslog\.7amrecover> add syslog\.7Added /log/syslog\.7amrecover> lpwd/var/logamrecover> lcd \.\./varamrecover> extractExtracting files using tape drive /dev/nst0 on host 192\.168\.0\.10The following tapes are needed: DMP014Restoring files into directory /varContinue? [Y/n]: yLoad tape DMP014 nowContinue? [Y/n/t]: yset owner/mode for \'\.\'? [yn] namrecover> quit200 Good bye\.# ls \-l syslog\.7total 26\-rw\-r\-\-r\-\- 1 root other 12678 Oct 14 16:36 syslog\.7.fi.RE.PPIf you do not want to overwrite existing files, create a subdirectory to run\fBamrecover\fRfrom and then move the restored files afterward\..sp.RS 4.nf# cd /var# (umask 077 ; mkdir \.restore)# cd \.restore# amrecoverAMRECOVER Version 2\.4\.2\. Contacting server on oops \.\.\.\.\.\.amrecover> cd log/var/logamrecover> ls\.\.\.amrecover> add syslog\.7Added /log/syslog\.7amrecover> lpwd/var/\.restoreamrecover> extractExtracting files using tape drive /dev/nst0 on host 192\.168\.0\.10\.\.\.amrecover> quit200 Good bye\.# mv \-i log/syslog\.7 \.\./log/syslog\.7\-restored# cd \.\.# rm \-fr \.restore.fi.RE.PPIf you need to run\fBamrestore\fRby hand instead of letting\fBamrecover\fRcontrol it, use the\fBlist\fRcommand after browsing to display the needed tapes\..sp.RS 4.nf# cd /var/log# amrecoverAMRECOVER Version 2\.4\.2\. Contacting server on oops \.\.\.\.\.\.amrecover> ls\.\.\.amrecover> add syslog syslog\.6 syslog\.7Added /log/syslogAdded /log/syslog\.6Added /log/syslog\.7amrecover> listTAPE DMP014 LEVEL 0 DATE 1997\-12\-08 /log/syslog\.7 /log/syslog\.6TAPE DMP015 LEVEL 1 DATE 1997\-12\-09 /log/syslogamrecover> quit .fi.RE.PPThe\fBhistory\fRcommand shows each tape that has a backup of the current disk along with the date of the backup, the level, the tape label and the file position on the tape\. All active tapes are listed, not just back to the most recent full dump\..PPTape file position zero is a label\. The first backup image is in file position one\..sp.RS 4.nf# cd /var/log# amrecoverAMRECOVER Version 2\.4\.2\. Contacting server on oops \.\.\.\.\.\.amrecover> history200\- Dump history for config "daily" host "this\-host\.some\.org" disk "/var"201\- 1997\-12\-09 1 DMP015 9201\- 1997\-12\-08 1 DMP014 11201\- 1997\-12\-07 0 DMP013 22201\- 1997\-12\-06 1 DMP012 16201\- 1997\-12\-05 1 DMP011 9201\- 1997\-12\-04 0 DMP010 11201\- 1997\-12\-03 1 DMP009 7201\- 1997\-12\-02 1 DMP008 7201\- 1997\-12\-01 1 DMP007 9201\- 1997\-11\-30 1 DMP006 6\.\.\.amrecover> quit .fi.RE.SH "ENVIRONMENT".PP\fBPAGER\fRThe\fBls\fRand\fBlist\fRcommands will use $PAGER to display the file lists\. Defaults to\fImore\fRif PAGER is not set\..PP\fBAMANDA_SERVER\fRIf set, $AMANDA_SERVER will be used as index\-server\. The value will take precedence over the compiled default, but will be overridden by the \-s switch\..PP\fBAMANDA_TAPE_SERVER\fRIf set, $AMANDA_TAPE_SERVER will be used as tape\-server\. The value will take precedence over the compiled default, but will be overridden by the \-t switch\..SH "AUTHOR".PPAlan M\. McIvor<alan@kauri\.auck\.irl\.cri\.nz>: Original text.PPStefan G\. Weichinger,<sgw@amanda\.org>, maintainer of the\fIAmanda\fR\-documentation: XML\-conversion.SH "SEE ALSO".PP\fBamanda\fR(8),\fBamanda-client.conf\fR(5),\fBamrestore\fR(8),\fBamfetchdump\fR(8),\fBreadline\fR(3),\fI\%http://wiki.zmanda.com\fR
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -