⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intro

📁 一套客户/服务器模式的备份系统代码,跨平台,支持linux,AIX, IRIX, FreeBSD, Digital Unix (OSF1), Solaris and HP-UX.
💻
📖 第 1 页 / 共 2 页
字号:
in a filesystem on the client. It serves for determining, wherethe data for restore can be found on the server and to determine,whether a user is allowed to restore the corresponding file, ifthis possibility is configured (see HOWTO.FAQ.DO-DONT Q7).Each time a full backup is done, a new filelist is started.Incremental backups result in appending lines to this file.The filelist files are identified by the number of the fullbackup, that is increased continuously each full backup.A configurable number of such filelist files is kept for lateruse. The restore utility needs these lists when certain filesare requested for restore. If these filelists get lost, you arein trouble. You should use the mechanism described in the nextsection to avoid this.Minimum restore informationThe minimum information to restore everything (the stored dataand the filelists) is on which cartridges and in which tape filesthe data can be found. At each start of a full or incrementalbackup this information is passed to a configurable program thatcan read this information (a line of a special format) as thestandard input. This program should write this to a place whereit is safe from crashes of the local machine. One possibilityis a NFS-mounted directory, another one is to send thisinformation via email. This minimum information can be passedto the restore utility for restoring either everything or onlythe filelist files. The minimum restore information is notcumulative i.e. only the latest one is required. Without thisminimum restore information, a tape scan is necessary todo emergency recovery (get everything back after a completeloss). This takes notably longer and can be avoided havingthis little string available when needed.If it is required to restore older backups or filelists that have beendeleted, because they fell out of the configurable number of indexesto keep, the older minimum restore information can be used.So it is not a bad idea to store it together with thecurrent date. This possibility requires, of course, that thetapes with the older backups have not been overwritten.Levels of Disaster / data lossThere are several stages of recovery from loss of data dependingon what information is still abailable and usable.* saved filesystem entries are lost on a client, but indexes  (filelists) are intact:    - (x)afrestore without options -e, -E    - uses index    - end user restore possible, if configured* index(es) lost, minimum restore information at hand:    - afrestore with option -e (probably first -f, if desired)    - pipe the minimum restore string into the program    - must be done by administrator (superuser)    - the minimum restore info is NOT (in) an index file,      it's the string starting with @@@===--->>>* index(es) lost, minimum restore information lost:    - afrestore with option -E    - supply number(s) of tapes probably having the most      recent minimum restore information    - must be done by administrator (superuser)    - if afbackup -E does not find anything: try to find the      minimum restore info on tape using dd(1), strings(1)      and grep for @@@===--->>> (in quotes, please) on the      tape* server broken:    - same procedure like for the client    - the server's latest version of the var-directory must      be restored before doing anything elseSee also HOWTO Q24 and the DO-DONT section for more details.Client-side program structureThere is a three-layer program hierarchy on the client side. Theprogram "afclient" in the client's binary directory performsthe packing, unpacking and the communication with the serverside. It does not read the configuration file and does notmaintain the filelists described above. This is done by programswith higher functionality, that in turn call the "afclient" programsetting it into different modes. The entry "afbackup" in the samedirectory is identical with "afclient". These higher level programsare full_backup, incr_backup, afrestore, afverify and a few more.afrestore in turn is used by the X11-frontend xafrestore. See HOWTOQ41 for more information about the architecture.How to use it-------------First a short summary, which program serves for what purpose,in order of estimated interest:client side:full_backup     runs a backup of all configured files/directoriesincr_backup     runs an incremental or level-X backup i.e. only                things modified since one of the previous backups                are savedafrestore       restore files/directories whose names are matching                given argumentsxafrestore      an X11-frontend for afrestoreafverify        compare the latest or an older backup with the                current status of the files/directoriesupdate_indexes  remove entries from the online file index, whose                corresponding tapes have been erased on the                server(s)copy_tape       make an identical copy of one tape to another                assigning a different secondary label numberclientconfig    program to modify the client configuration                interactively, online help availablexclientconfig   ditto, but as X11-programserver side:afserver        the server program operating the tape and serving                one client at a timeafmserver       the multiplexing frontend for afserver, possibly                serving several clients in parallellabel_tape      to put a valid afbackup label to a tape or read itcart_ctl        in combination with a changer: handle tapes and                maintain their locationscartis          to change the writing position on tape manually                (use carefully !)cartready       to give manual hints to the server when requested                to perform some administrative actionserverconfig    program to modify the client configuration                interactively, online help availablexserverconfig   ditto, but as X11-programxserverstatus   displays the current status of the server and the                most recent entries of the serverside logFor detailed information about the programs see the PROGRAMS file,the manual pages, and the HOWTO-FAQ, e.g. FAQ Q41Now a typical case is described. Individual needs can besatisfied by reading the rest of the documentation. Below arehints to configuration files for some typical cases thatcome with the distribution.Let us assume, you have a DAT-cartridge handler with 12 tapesconnected to some machine without the possibility to set acartridge directly via commandline interface. The firstthing to do is set the robot to sequential mode. It is no badidea to make this machine "fetch" the backup from the clientsusing a small script that is started via crond. Thus thefirst step is to setup this backup server. Unpack thedistribution, run the Install script and select installationoption number 1 for installing and configuring the server side.The last question to be answered is whether to run theserverside configuration program. Answer with yes, because weshould do this now. Most entries can be accepted as they are,using the default value. You must know yourself Which deviceshould be used (you have, of course, already done some archivingwith tar to the connected streamer!). The blocksize can be lookedup usually in the man-pages of rmt or tar. Set the parameter"CartridgeHandler" to 1 and the number of cartridges to 12.Because you must use the robot sequential mode, clearthe "SetCartridgeCommand", if not already done entering theparameter number and a single space for the value. Set the"ChangeCartridgeCommand" to a command, that ejects a tape fromthe drive (usually mt -f %d rewoffl - the %d stands for theconfigured devicename, just for convenience, so that it neednot to be typed in several times). The UserToInform-parametershould be set to some administrator, or group of administrators,that should receive important informations. The rest of the para-meters are quite self-explanatory. Use the online-help, theCONFIG and the HOWTO.FAQ.DO-DONT, if you don't know what theymean. Especially the CONFIG should provide valuable hints.Finish the server configuration by entering "ok".Now make the robot have cartridge number 1 present insidethe streamer. If you do not want to do this or can't convincethe device to do what you desire, run the following command:/the/path/to/server/bin/cartis <cartno>where <cartno> is the integer number specifying the cartridgecurrently present in the drive.Now install the client side on each client, that should dobackups to the server. Again, unpack the distribution andrun the Install script, choosing the installation optionnumber 3 for client with remote start possibility. Again, alldefaults should be ok, so the last question, whether to runthe clientside configuration program can be confirmed.Reasonable defaults are present for each parameter. What youhave to configure in any case are the files and directories,that are to be stored. Furthermore, the startup informationprogram should be configured to a reasonable command (see aboveunder "Minimum restore information" for details). If youare upgrading to a newer version and some of the parametersare not set, see the client.config (or server.config, respec-tively) of the current distribution for the defaults, that Iconsider sufficient for normal cases. This also might give youbetter ideas about what the parameters are good for.Finally write small scripts starting the backup one after theother on the clients (the server may off course also be aclient). An example script is provided in the HOWTO.FAQ.DO-DONTunder Q2. Just replace the list of hosts in the shell-variableBACKUPCLIENTS. Now add entries to root's crontab-file. Enteringcrontab -l > my_crontabas root writes the current crontab to the file my_crontab. E.g. torun a full backup each Friday evening and incrementalbackups each evening from Monday to Thursday (all at 8 pm), addthese two lines:0 20 * * 5   /usr/backup/client/bin/full_backup_cycle0 20 * * 1-4 /usr/backup/client/bin/incr_backup_cycleassuming the named programs are the scripts you wrote accordingto the above description. Then run the command crontab my_crontabto install the modified crontab file.That's it. Maybe, you want to start the first full backup manuallyto see whether everything is correctly installed and working.In this case just start the script yourself and watch, whathappens. Especially watch the client- and server-side logfiles in/path/to/client/var/backup.log and /path/to/server/var/backup.log.Sample configuration files (Linux)server.conf.manual    For a streamer on /dev/nst0 without a changer, so tapes must be    changed manuallyserver.conf.changer    For a streamer on /dev/nst0, changer on /dev/sg0 (run scsicheck    to find correct device), stacker has 7 slots, no loadport, copy    changer.conf.mtx to /path/to/server/lib/changer.confserver.conf.dir    For writing the backup to a filesystem (directory /var/backup)    using the directory option of (see:) HOWTO Q 3server.conf.dirsl    For writing the backup to a filesystem (directory /var/backup)    using the symlink option of (see:) HOWTO Q 3client.conf    client side configuration file, appropriate for many cases    (server hostname or alias must be backuphost, do adapt the    parameter DirsToBackup to what is really appropriate)----If this introduction together with the rest of the documentationis not sufficient, please let me know, but PLEASE give meinstructive hints regarding what you are missing or what shouldbe clarified.Albert FluegelDecember 8, 2001

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -