📄 afrestore.8.in
字号:
.TH AFRESTORE 8 "2001 April 1" "Debian Project".SH NAMEafrestore \- the restore utility of the afbackup package.SH SYNOPSIS.B afrestore[ -nltvmi ] [ -<past-backup-no> ] [ -C <root-directory> ][ -h <backuphosts> ] [ -P <backup-ports> ][ -c <configuration-file> ] [ -W <identity> ][ -A "<after-date>" ] [ -B "<before-date>" ][ -T <tapes> ][ -I <indexfile-part> ] [ -V <var-directory> ][ -k <encryption-key-file> ][ -z <process-cmd> <unprocess-cmd> ][ -Z <built-in-compress-level> ] [ -F <format> ][ { -N <num-indexfiles> | -O <indexfile-age-days> } ][ -M <server-message-config> ][ -p ] <path-pattern> [ [ -p ] <path-patterns> [ ... ] ].br.B afrestore-a [ -nlvm ] [ -<past-backup-no> ] [ -C <root-directory> ][ -h <backuphosts> ] [ -P <backup-ports> ][ -c <configuration-file> ] [ -W <identity> ][ -I <indexfile-part> ] [ -V <var-directory> ][ -k <encryption-key-file> ][ -z <process-cmd> <unprocess-cmd> ][ -Z <built-in-compress-level> ] [ -F <format> ][ -M <server-message-config> ].br.B afrestore-{ef} [ -evm ] [ -C <root-directory> ] [ -h <backuphosts> ][ -P <backup-ports> ] [ -V <var-directory> ][ -z <process-cmd> <unprocess-cmd> ][ -Z <built-in-compress-level> ][ -k <encryption-key-file> ] [ -W <identity> ][ -M <server-message-config> ][ -c <configuration-file> ] < <startup-info-file>.br.B afrestore-E [ -Enlvm ] [ -C <root-directory> ] [ -h <backuphosts> ][ -P <backup-ports> ] [ -V <var-directory> ][ -z <process-cmd> <unprocess-cmd> ][ -Z <built-in-compress-level> ][ -k <encryption-key-file> ] [ -W <identity> ][ -M <server-message-config> ][ -c <configuration-file> ][ <cartridge-number> | <cartridge-range> ] ... ].SH DESCRIPTIONThe first form can be used for restoring selected pieces ofa certain previous backup run. If no option of the type.I -<past-backup-no>is supplied (e.g. -2 ), the most recentlymade backup is accessed. If an option like this is given,the backup system tries to extract the files from the backupbefore ( -1 ) or even an earlier one. This requires, thatenough file- and directory-name-logging is provided. Thiscan be done with the client-side configuration parameterNumIndexesToStore (See: afclient.conf(8)). The parameters.I <path-pattern>indicate, which files and directories should be restored. Anasterisk is implicitely put before and after the.I <path-pattern>,so it is assumed to be a substring of the path. This can beprevented preceding the.I <path-pattern>with the option -p.These may be wildcards for the full path name leading to thefile relative to the directory, to that the client changesbefore starting any backup or restore (See under the parameterRootDirectory under afclient.conf(8)).Note, that you have to put these into quotes, if you are using wildcards to prevent substutition. Itis a bad idea to restore a total backup entering: restore "*"This leads to a huge filelist to be processed by the client,what might plug up memory and/or temporary space in somefilesystem. Instead you should use the second form with theoption -a, what restores a total backup. The third formrestores without looking for filename log files. Instead itreads the standard input for information, where to extractfrom. The format expected at standard input is the same asproduced by incr_backup or full_backup, if the configurationoption StartupInfoProgram is used. The given program is thensupplied with the appropriate information and should writeit to some place outside the local host, so that it will notbe affected by a hard crash (see: StartupInfoProgram inafclient.conf(8)). The flag -e can be supplied more than one time. Inthat case the emergency restore goes back to the beginning ofthe previous full backup, if the full backup is split intoseveral parts (configuration parameter NumBackupParts) andthe last part of the current full backup has not yes run. Ifthe backup parts configuration has changed after the beginningof the previous full backup, this option should be considered,as it gives additional safety, that really everything will berestored. The fourth form scans the cartridges (if supplied)on the given servers (if supplied, eventually with alternategiven port numbers - see below for the format, how to specifycartridge/host/port-triples) for backups done from the host,where the restore program is started and restores everythingit finds. The functionality is similar to -e, but no input hasto be supplied. Like with option -e, the -E flag can be givenseveral times, what has the same meaning like with option -e(see above). If the client's hostname has changed or restoreshould be done on another host, the original client ID must besupplied with the -W option. Otherwise nothing or the wrongstuff will be restored. Scanning the cartridges can take a lotof time, but it should be several minutes, not hours.Cartridges can be supplied in three forms as arguments: simplenumbers, ranges (e. g. as 3-5 without spaces), and rangesrelative to the current backup writing position (e. g. as -3).In the latter case -0 means the cartridge, that will be writtento next time i.e. that holds the current writing point. -2 standsfor the latest 3 cartridges. To indicate, that a cartridge islocated at a certain backup server, maybe with a special portnumber (if there are several backup servers), the cartridgenumber or range can be followed by the at-character @, optionallyfollowed by the percent character % and the port number, e. g.3-5@buhost%2989 . No whitespace is allowed in such a specifier.If no port is given, the default port is assumed (2988). If nohostname is given, the default backup server is used. Defaultbackup server is the first one in the list, that is configuredin the parameter file or overriden by the option -h. Any numberof ranges or numbers can be supplied, overlapping duplicates areignored. If no cartridge numbers are given, the program searchesbackward from the current writing position on each configuredbackup server until it thinks, it has enough backups found, orall cartridges on that server have been tried. The found backupsare sorted in the correct order (using the stored backup time)and afterwards everything found is restored.This form of the command needsno information at all for an emergency restore.If the configuration file is not suppliedexplicitly,then it is searched for in the @clientlibdir@ and if notfound there the files /etc/buclient.conf, /etc/afbuclient.conf,/etc/afclient.conf and/etc/afbackup/client.conf are tried..PP.TP.B -A <date> restore files modified after the given date. The dateshould be put into quotes, cause it usually containswhitespace. Valid formats are e.g.:.br MM/DD/YYYY hh:mm:ss.br DD.MM.YYYY hh:mm:ss.br or the formats produced by ctime(3) or date(1). Theyear may be supplied in two digits or in the non-US-formats be omitted, then the current year is assumed.The seconds may also be omitted (hh:mm), the wholetime may be left off, then 00:00 is assumed. Thusthe shortest valid format is DD.MM.TP.B -B <date>restore files modified before the given date. See.B -A for the valid date formats.TP.B -C <rootdir>change to the given root-directory before restoringfiles instead of the one specified in the clientside configuration file. If this directory doesnot exist, it will be created.TP.B -c <configfile>use the given file for configuration information.TP.B -e restore all files from the previous backup in anemergency case without looking for the filenamelogfiles, which are also restored.TP.B -F <format-string>In combination with -l a format string for output.Default is: only the full paths of the storedfiles are printed, one per line. The format stringcan also contain patterns representing other fileattributes present in the index file(s). For possiblepatterns see below under FORMAT STRING..TP.B -f restore only the filename logfiles in an emergencycase.TP.B -h <hostnames>Use the given list of hosts as backup servers. Thislist is used only, if no hostname information canbe found as associated with the current filesystementry, that should be restored. The first host inthis list is the default server, if no hostnameinformation at all can be found. If -E is givenand no cartridge number is supplied at all, allhosts in this list are tried one after the other.The hostnames in this list can be separated bywhitespace and/or commas.TP.B -I <idx-prefix>The first part of the filename, the names of thestored files and directories are written to. Thecurrent total backup number is appended (thatincrements each start of a full backup). If thesefiles undergo processing, .z is appended.TP.B -iIgnore case distinctions in the filename patterns.TP.B -k <file>Use the contents of the given file as encryptionkey for authenticating to the server.TP.B -l Do not restore anything, just list the names ofthe files and/or directories, that fit the suppliedpath-part(s); in combination with -E: just scan thegiven tape(s) and printout the minimum restore info,that can be read by restore -e.TP.B -M <server-message-config>The configuration to output messages from the server,that normally are sent only via mail to a maintainer.The first word consisting of the letters b r v and ctells, whether to output messages during backup,restore, verify and copy-tape, respecively. The nextwords must name the service name or port number ofthe single stream servers, related to the option -P .For each multi stream service configured with -P orin the configuration file, the respective singlestream service must be given here.TP.B -mDo not overwrite existing files (merge).TP.B -n do not restore anything, just printout a message,how many files and/or directories fit the suppliedpath-part(s); in combination with -E: just scan thegiven tape(s) and printout, what backups have beenwritten there.TP.B -N <numidxs>The maximum number of index files, that are scannedfor matching filenames. With each full backup, a newindex file is created. If time restrictions are given(options -A or -B), all existing index files areread, what may take a long time, if many of them arekept available (see clientside configuration optionNumIndexesToStore or option -N of full_backup). Sousing this parameter the scanning can be restrictedto a certain number of files.TP.B -O <maxidxage>The maximum age of index files, that are scanned formatching filenames, in days. See option -N . Thegiven number of days may be a floating point value.TP.B -P <portnos>The list of port numbers for the backup serverseither configured in the parameter file or suppliedwith the -h option. This list is used only, if noport number information can be found as associatedwith the current filesystem entry, that should berestored. The port numbers supplied here are associatedwith the backup server names by position.The port numbers in this list can be separated bywhitespace and/or commas.TP.B -T <tapes>Restore and list only files from the given list oftapes. Tapes can be specified using numbers, commasand dashes, e.g. 3-5,8,1.TP.B -tDo not restore anything, just list the tapes, thatwould be needed to restore everything that matchesthe supplied path-part(s).TP.B -V <var-dir>The directory, where varying files are put.TP.B -z <proccmd> <unproccmd>The commands to use for process and unprocess. Ifa command comprises of several words, it must beput in quotes.PPI suggest to run restore with the .B -l option before really goingto restore anything. So you see, what files will be generated,without overwriting existing ones unintendedly..SH FORMAT STRINGThe following patterns will be replaced:.TP.B %nThe filename with full path like in default output.TP.B %bThe basename of the file, without path.TP.B %OThe username of the file owner.TP.B %oThe user-ID of the file owner (integer).TP.B %mThe modification time in seconds since epoch.TP.B %MThe modification time in readable format.TP.B %tThe starting time of the backup containingthe file in seconds since epoch.TP.B %TLike %t, but in readable format.TP.B %hThe hostname of the backup server, to thatthe file has been backuped.TP.B %pThe port number of the backup server, to thatthe file has been backuped.TP.B %cThe cartridge number on the server, the savedfile can be found on.TP.B %fThe tape file number on cartridge %c, wherethe saved file can be found.TP.B %%A percent character.PPThe usual C-like backslash sequences are allowed,but special characters within the filenames arestill printed as escape sequences, e.g. \\n .A newline at the end must be given explicitly asbackslash n (\\n), otherwise no new line will start.Double quotes should be written as \" within theargument enclosed in single quotes. To see severalversions of a saved filesystem entry in the indexesthe option -B or -A must be given, maybe with acondition, that is always true, e.g. -B 23:59, whatmeans: before today, 23:59..SH FILES.IP @clientconfdir@/@clientconf@Client configuration file.IP @clientlogdir@The directory for logging the client backups.IP @clientvardir@Some internal state information of the client backups..SH SEE ALSOafclientconfig(8), xafclientconfig(8), full_backup(8),incr_backup(8), afverify(8), afrestore(8), xafrestore(8),update_indexes(8),copy_tape(8), afclient.conf(8), afserver(8), afmserver(8),afserver.conf(8),tar(1) .SH AUTHOR.B afbackup was written by Albert Fluegel (af@muc.de).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -