Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!bruce!gdwb.oz.au!csb From: csb@gdwb.oz.au (Craig Bishop) Newsgroups: comp.protocols.nfs Subject: Re: Backup Program for PCNFS Message-ID: <558@rome.gdwb.oz.au> Date: 18 Dec 90 01:15:32 GMT References: <90.348.08:58:51@ira.uka.de> Organization: Geelong & District Water Board, Australia Lines: 99 dbraun@i50s7.ira.uka.de writes: >Is LifeLine, a program mentioned in the PC NFS manual a solution? >Is there any public domain possibility. We use Lifeline backup and it works very well. We also backup all of our PC's (about 50) to an exabyte using lifeline in combination with some software we wrote which allocated the exabyte tape drive to the PC's which wish to backup. Below is the README file for the pcbackup utilities we have written. When time permits we were going to release the PC and Unix scripts to the network. ------------------- Pcbackup README --------------------------- PCBACK.BAT runs on the PC and is in control of the remote tape drive via Lifeline tar. However the remote server needs to be in control of who gets the tape drive to avoid contention issues. PCBACK does the following: 1. sets the time from the server (not needed but nice to do!) 2. gets the name of the server and the tape drive (allows this to be centrally controlled for all PCs and to split PCs across two or more servers and/or tape drives) 3. logout the user so that backup runs as nobody and most network drives are dismounted 4. mount a special exported tmp area for handshaking (access control to tape unit) 5. checks whether Homebase is loaded (if %HB% set), check whether %PC% is set (set in autoexec.bat) and checks syntax of command. Should be PCBACK drive1 drive2 drive3 ... e.g. PCBACK C D E to backup drives c,d,e 6. creates flagfile %PC%.rdy to tell Unix shell script that PC is waiting for backup. Shell script (hereafter called pcbackup) sorts through the PCs waiting for backup according to creation time of various %PC%.rdy files 7. wait for returned flagfile %PC%.go (check for its existence every 30 seconds - at the end of the sleep check if we exitted sleep via ^C) - also check if shell script is running (pcbackup.run should exist) 8. while waiting display the PC which is currently backing up (if any) 9. create %PC%.drive (eg PC67.c) and the %PC%.chk (eg PC67.chk) flagfiles 10. execute the tar command 11. do points 7 to 10 for every other drive Note: NFSDRIVE is set to Q (a networked drive) at the beginning of the file and reset to C (where the real \NFS directory is kept). Also since this runs as nobody and uses rsh, you must have a nobody usercode with its .rhosts containing all your PC's on your server. MAKE SURE YOU READ ALL THE COMMENTS ESPECIALLY IN THE SHELLSCRIPT. THIS WILL GIVE YOU A GOOD IDEA ON THE HANDSHAKING INVOLVED. IF A PC TIMES OUT (IE START THE HANDSHAKING AND THEN HANGS) THE WHOLE BACKUP IS ABORTED. THIS IS BECAUSE THE UNIX SERVER CANNOT DETERMINE IF ANY DATA HAS BEEN WRITTEN TO THE TAPE. IT THEREFORE CANNOT REPOSITION WITH GREAT CONFIDENCE. (POSSIBLY IT COULD KEEP TRACK OF FILES WRITTEN AND REWIND THEN SPACE FORWARD BUT IT DOESN`T HAPPEN THAT OFTEN THAT IT IS A PROBLEM.) Addenda: BACKUP.DB is not used since we specify the host and device in the actual tar command and use defaults for anything else. This includes using standard block size and the standard dd utility on the Unix host. Remember that pcbackup.sh running on the Unix host only controls who gets the tape drive. It doesn't (in fact can`t) enforce it either. It does not talk directly to the tar program and handles no data. It waits for the PC to create PC??.RDY. It creates a sorted list (by time) of the PCs ready to backup. Starting with the top of the list it creates PC??.GO (?? is the first one). PCBACK.BAT responds with PC??.CHK and PC??.drive and then starts backing up the first drive. When finished this drive it creates PC??.FIN if it has another drive. It waits for PC??.go again etc. At the finish of all drives it creates PC??.END. The Unix host (pcbackup.sh) then resorts all the PC??.RDY files and start at the top of the list. tar from within PCBACK.BAT invokes dd on the Unix host and transfers the data. This part of the procedure is totally independent of anything we have written. ------------------------------------------------------------------- Craig Bishop Geelong & District Water Board Phone: +61 52 262506 61-67 Ryrie St Geelong Fax: +61 52 218236 Victoria 3220 Australia -- Craig Bishop Geelong & District Water Board Phone: +61 52 262506 61-67 Ryrie St Geelong Fax: +61 52 218236 Victoria 3220 Australia