📄 clientconfig.in
字号:
PAGER=more else PAGER="$PAGER -eX" fifiif [ $# -eq 1 ] ; then configfile="$1"else found=0## configurable part: configuration files to look for# configfiles="$BACKUP_HOME/etc/backup.conf $BACKUP_HOME/lib/backup.conf /etc/buclient.conf /etc/afbuclient.conf /etc/afclient.conf /etc/afbackup/client.conf @clientconfdir@/@clientconf@ @clientlibdir@/@clientconf@"## end configurable part# for configfile in $configfiles ; do if [ -r $configfile ] ; then found=1 break fi done if [ $found -eq 0 ] ; then echo `T_ "No configuration file found. Exiting."` exit 2 fificonfigfile=`resolvepath $configfile`if [ ! -r $configfile ] ; then echo `T_ "Error: Cannot read configuration file"`" $configfile. "`T_ "Exiting."` exit 3ficonfiglines="`cat $configfile`"getparam(){ if [ _"$configlines" = _ ] ; then configlines="`cat $configfile`" fi echo "$configlines" | $AWK '/^[ ]*'"$1"'/{sub("'"$1"'[ ]*",""); print}'}promptlen=32## configurable part: the parameter values#num_fix_params=34num_var_sp_idx=34comments__1=`TN_ "\nThe backup server hosts"`comments__2=`TN_ "\nThe backup server port-numbers"`comments__3=`TN_ "\nThe cartridge sets to use"`comments__4=`TN_ "\nServer messages output configuration"`comments__5=`TN_ "\nThe programs to process the files, that are saved, and the counterpart\nto do the reverse processing, if desired. In most cases compression\nand uncompression"`comments__6=''comments__7=`TN_ "\nLevel of built-in compression, if supported."`comments__8=`TN_ "\nThe part of the file, where the saved filenamesare stored (current number appended)"`comments__9=`TN_ "\nThe programs to process the file indexes and the counterpart to do\nthe reverse processing, if desired. In most cases compression\nand uncompression"`comments__10=''comments__11=`TN_ "\nWhether to process the saved files"`comments__12=`TN_ "\nWhether to process the index files"`comments__13=`TN_ "\nPatterns for names of files, no preprocessingis performed on"`comments__14=`TN_ "\nThe number of such files, that are maintained.More (older ones) are removed."`comments__15=`TN_ "Alternatively the maximum age of index files to be kept in days.Older ones are removed"`comments__16=`TN_ "\nThe maximum number of previous index files, that are scanned for restore"`comments__17=`TN_ "\nAlternatively the maximum age of index files in days to be scanned forrestore"`comments__18=`TN_ "\nFor restore: Check, whether the user has sufficient permissionsto restore files to the same place, from where they were saved"`comments__19=`TN_ "\nThe file where to log events"`comments__20=`TN_ "\nThe directory for varying files"`comments__21=`TN_ "\nThe identifier for the client (needed, if several afbackupinstallations reside on one host)"`comments__22=`TN_ "\nLocking file to prevent several client program starts"`comments__23=`TN_ "\nThe file with the authentication encryption key"`comments__24=`TN_ "\nThe program to save startup information"`comments__25=`TN_ "\nThe program to be run before attempting a backup. If this programreturns an exit status unequal to 0, no backup is performed."`comments__26=`TN_ "\nThe program to be executed when everything requested is done.%l is replaced by the filename-logfile, %r by the file withthe report statistics, %e by the overall exit status,%i with the minimum restore information"`comments__27=`TN_ "\nThe directory, where to run the backup"`comments__28=`TN_ "\nNames of files to be skipped during the backup(wildcards are allowed)"`comments__29=`TN_ "\nNames of directories to be skipped during the backup(wildcards are allowed)"`comments__30=`TN_ "\nName of a file containing a (pattern-) list of filesand directories to be skipped during the backup"`comments__31=`TN_ "\nFilesystem types to save, skip (-) or prune (/)"`comments__32=`TN_ "\nWhether to write CRC32 checksums to the backup or not"`comments__33=`TN_ "\nWhether to use the ctime in addition to mtime during incremental backup"`comments__34=`TN_ "\nThe number of parts of the full backup (if this takes a long time)"`comments__35=`TN_ "\nThe subdirectories of the RootDirectory to backup(wildcards are allowed)"`comments__36=`TN_ "\nThe subdirectories of the RootDirectory to backup, part #num#(wildcards are allowed)"`names__1='BackupHosts'names__2='BackupPorts'names__3='CartridgeSets'names__4='PrintServerMessages'names__5='ProcessCmd'names__6='UnprocessCmd'names__7='BuiltinCompressLevel'names__8='IndexFilePart'names__9='IndexProcessCmd'names__10='IndexUnprocessCmd'names__11='ProcessBackupedFiles'names__12='ProcessIndexFiles'names__13='DoNotProcess'names__14='NumIndexesToStore'names__15='DaysToStoreIndexes'names__16='NumIndexesToScan'names__17='DaysToScanIndexes'names__18='CheckRestoreAccessPerms'names__19='LoggingFile'names__20='VarDirectory'names__21='ClientIdentifier'names__22='LockFile'names__23='EncryptionKeyFile'names__24='StartupInfoProgram'names__25='InitProgram'names__26='ExitProgram'names__27='RootDirectory'names__28='FilesToSkip'names__29='DirsToSkip'names__30='ExcludeListFile'names__31='FilesystemTypes'names__32='WriteChecksums'names__33='UseCTime'names__34='NumBackupParts'names__35='DirsToBackup'names__36='DirsToBackup#num#'patterns__1='[Bb]ackup[ _-]*[Hh]osts?:?[ ]*'patterns__2='[Bb]ackup[ _-]*[Pp]orts?:?[ ]*'patterns__3='[Cc]artr?i?d?g?e?[-_ ]*[Ss]ets?:?'patterns__4='[Pp]rint[-_ ]*[Ss]e?r?ve?r?[-_ ]*[Mm]e?ss?a?ge?s?:?[ ]*'patterns__5='([Pp]rocess|[Cc]ompress)[-_ ]*[Cc]o?m?ma?n?d:?[ ]*'patterns__6='([Uu]nprocess|[Uu]ncompress)[-_ ]*[Cc]o?m?ma?n?d:?[ ]*'patterns__7='[Bb]uilt[-_ ]*[iI]n[-_ ]*[Cc]ompre?s?s?i?o?n?[-_ ]*([Ll]evel)?:?'patterns__8='[Ii]ndex[ _-]*[Ff]ile[ _-]*[Pp]art:?[ ]*'patterns__9='[Ii]ndex[ _-]*([Pp]rocess|[Cc]ompress)[-_ ]*[Cc]o?m?ma?n?d:?[ ]*'patterns__10='[Ii]ndex[ _-]*([Uu]nprocess|[Uu]ncompress)[-_ ]*[Cc]o?m?ma?n?d:?[ ]*'patterns__11='([Pp]rocess|[Cc]ompress)[-_ ]*[Bb]ackupe?d?[-_ ]*([Ff]iles)?:?'patterns__12='([Pp]rocess|[Cc]ompress)[-_ ]*([Ll]ogg?i?n?g?[-_ ]*[Ff]iles?|[Ii]n?d(e?x|i?c)e?s?([Ff]iles?)?):?'patterns__13="[Dd]o[-_ ]*[Nn].?[o]?t[-_ ]*([Pp]rocess|[Cc]ompress):?[ ]*"patterns__14='[Nn]um[-_ ]*[Ii]nd(ic|ex)es[-_ ]*[Tt]o[ _-]*[Ss]tore:?'patterns__15='[Dd]ays[-_ ]*[Tt]o[ _-]*[Ss]tore[-_ ]*[Ii]nd(ic|ex)es:?'patterns__16='[Nn]um[-_ ]*[Ii]nd(ic|ex)es[-_ ]*[Tt]o[ _-]*[Ss]can:?'patterns__17='[Dd]ays[-_ ]*[Tt]o[ _-]*[Ss]can[-_ ]*[Ii]nd(ic|ex)es:?'patterns__18='[Cc]heck[-_ ]*[Rr]estore[-_ ]*[Aa]ccess[-_ ]*[Pp]ermi?s?s?i?o?n?s?:?'patterns__19='[Ll]ogg?i?n?g?[-_ ]*[Ff]ile:?[ ]*'patterns__20='[Vv][Aa][Rr][-_ ]*[Dd]ire?c?t?o?r?y?:?[ ]*'patterns__21='([Cc]lient[-_ ]*)?[Ii]denti(ty|fier):?[ ]*'patterns__22='[Ll]ocki?n?g?[-_ ]*[Ff]ile:?'patterns__23='([Ee]n)?[Cc]rypti?o?n?[ _-]*[Kk]ey[ _-]*[Ff]ile:?[ ]*'patterns__24='[Ss]tartu?p?[-_ ]*[Ii]nfo[-_ ]*[Pp]rogram:?[ ]*'patterns__25='[Ii]nit[-_ ]*[Pp]rogram:?[ ]*'patterns__26='[Ee]xit[-_ ]*[Pp]rogram:?[ ]*'patterns__27='[Rr]oot[ _-]*[Dd]ire?c?t?o?r?y?:?[ ]*'patterns__28='[Ff]iles[ _-]*[Tt]o[ _-]*[Ss]kip:?[ ]*'patterns__29='[Dd]ire?c?t?o?r?i?e?s[ _-]*[Tt]o[ _-]*[Ss]kip:?[ ]*'patterns__30='[Ee]xclu?d?e?[-_ ]*[Ll]ist[-_ ]*[Ff]ile[-_ ]*[Nn]?a?m?e?:?[ ]*'patterns__31='[Ff]i?l?e?[ _-]*[Ss]y?s?t?e?m?[ _-]*[Tt]ypes:?'patterns__32='([Ww]rite)?[Cc]heck[ _-]*[Ss]um(s|ming)?:?'patterns__33='[Uu]se[-_ ]*[Cc][-_ ]*[Tt]ime:?'patterns__34='[Nn]um[-_ ]*[Bb]ackup[-_ ]*[Pp]arts:?'patterns__35='[Dd]ire?c?t?o?r?i?e?s[ _-]*[Tt]o[ _-]*[Bb]ackup:?[ ]*'patterns__36='[Dd]ire?c?t?o?r?i?e?s[ _-]*[Tt]o[ _-]*[Bb]ackup[ ]*#num#[ ]*:?'prompts__1=`TN_ "Backup server hostnames:"`prompts__2=`TN_ "Backup server port-numbers:"`prompts__3=`TN_ "Cartridge-sets to use:"`prompts__4=`TN_ "Server message output configuration:"`prompts__5=`TN_ "File processing program:"`prompts__6=`TN_ "File unprocessing program:"`prompts__7=`TN_ "Built-in Compression Level:"`prompts__8=`TN_ "Index file part:"`prompts__9=`TN_ "Index processing program:"`prompts__10=`TN_ "Index unprocessing program:"`prompts__11=`TN_ "Process saved files:"`prompts__12=`TN_ "Process index files:"`prompts__13=`TN_ "Files not to be processed:"`prompts__14=`TN_ "Number of saved index files:"`prompts__15=`TN_ "Time to keep index files in days:"`prompts__16=`TN_ "Number of scanned index files:"`prompts__17=`TN_ "Scan index files of previous days:"`prompts__18=`TN_ "Test access rights during restore:"`prompts__19=`TN_ "Event/error-logging file:"`prompts__20=`TN_ "Var-Directory:"`prompts__21=`TN_ "Client-Identifier:"`prompts__22=`TN_ "Lock-file:"`prompts__23=`TN_ "Encryption-Key-File:"`prompts__24=`TN_ "Startup info logging program:"`prompts__25=`TN_ "Program to run before backup:"`prompts__26=`TN_ "Program to run at exit:"`prompts__27=`TN_ "Working directory:"`prompts__28=`TN_ "Names of files to skip:"`prompts__29=`TN_ "Names of directories to skip:"`prompts__30=`TN_ "File with names to skip:"`prompts__31=`TN_ "Filesystem types to save/skip:"`prompts__32=`TN_ "Write CRC32 checksums:"`prompts__33=`TN_ "Evaluate also the ctime:"`prompts__34=`TN_ "Number of full backup parts:"`prompts__35=`TN_ "Directories to backup:"`prompts__36=`TN_ "Directories to backup, part #num#:"`promptlen=35helps__1=`TN_ "These are the hostnames of the machines where a server side of the backup service resides. Some kind of streamer device must be connected to these machines. The files and directories, that should be saved, are packed, eventually processed somehow, and then sent to the named machines, who writes them to the connected device. The named machines are tested for service availability. If a server is busy, the next one is tried. BackupPorts can be configured in the same order as the host entries supplied here. The servers in this list may be separated by whitespace and/or commas. If the backup server is the same host as the client, the use of the name localhost is recommended."`helps__2=`TN_ "These are the port numbers on the backup server machines, where the backup server processes listen. The default is 2988 or the number found in the file /etc/services (or in NIS if it is configured). Several ports can be supplied, positionally according to the backup server hosts supplied in the BackupHosts parameter. The numbers can be separated by whitespace and/or commas. If fewer numbers are supplied than backup servers, the default port 2988 applies for the rest. If more port numbers are given, the superfluous ones are ignored."`helps__3=`TN_ "The cartridge sets on the server side to use for backups. They must be legal numbers between 1 and the number of cartridge sets configured on the appropriate server side. Several sets can be supplied, positionally according to the backup server hosts supplied in the BackupHosts parameter. The numbers can be separated by whitespace and/or commas. If fewer numbers are supplied than backup servers, the default set # 1 applies for the rest. If more cartridge set numbers are given, the superfluous ones are ignored."`helps__4=`TN_ "By default the server sends messages about current problems or required actions to a maintainer or, if determinable and configured, to the user on the client side. They cannot be seen as output on the client side. When this parameter is set, these messages are also output on the client side. The first word must consist of the letters b, v, r and c i.e. messages are output during backup, verify, restore, and/or copy-tape, depending on what letters appear. The next fields must name the respective single stream server ports or service names according to the configured ports in (2), i.e. wherever a multi stream port appears in the configuration in (2), here the respective single stream service must be named. If not given the values default to the ones configured in (2). If this parameter is not properly configured, the messages might not be seen on the client side for technical reasons."`helps__5=`TN_ "If you want your files to be processed during save (e.g. compressed), you can supply the name of the program that should perform the desired processing here. If you do so, you MUST also supply the appropriate unprocess- program. Note that this program may be specified with options but no shell-like constructions such as pipes, variables or wildcards. This program must read standard input and write to standard output. For pattern replacements see LoggingFile (19)"`helps__6=`TN_ "The counterpart to the processing program. You must either supply both process- and unprocess-program or neither of them. Like the process program, the unprocess-program must read standard input and write to standard output. For pattern replacements see LoggingFile (19)"`helps__7=`TN_ "A number, that specifies the level of built-in compression, if present, otherwise no built-in compression will be performed. If a process program is also specified, the order of processing is: First the data is piped through the external program and then built-in compression is done. Uncompressing works the other way round."`helps__8=`TN_ "The name of the file where the names of the saved files are stored. The current number is appended to this filename. The number is incremented each time a full backup starts. For pattern replacements see LoggingFile (19)."`helps__9=`TN_ "The program to preprocess the index file, in most cases some kind of compression. If this parameter is not set, it defaults to the setting of the ProcessCmd (5). If you set it, you MUST also supply the appropriate unprocess- program. Note that this program may be specified with options but no shell-like constructions such as pipes, variables or wildcards. This program must read standard input and write to standard output. For pattern replacements see LoggingFile (19)"`helps__10=`TN_ "The counterpart to the index processing program. If not given, it defaults to the setting of the UnprocessCmd (6). You must either supply both process- and unprocess-program or neither of them. Like the index process program, the unprocess-program must read standard input and write to standard output. For pattern replacements see LoggingFile (19)"`helps__11=`TN_ "This flag specifies, whether the files, that are saved, should be processed by the configured program."`helps__12=`TN_ "This flag specifies, whether the filename logging files (i.e. the index files) should be processed by the configured program."`
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -