From: dkf@chem.ucsd.edu (David Knight French)
Newsgroups: comp.unix.aix
Subject: Re: Help! How to do backup on a network?
Date: 3 Oct 1992 05:27:00 GMT
Organization: University of California San Diego, Chemistry
NNTP-Posting-Host: chedccf0.ucsd.edu

In article <3872@faatcrl.faa.gov> scramer@faatcrl (Scott Cramer) writes:
 >mt0lamg@convex1.tcs.tulane.edu (Louis X. Lee) writes:
 >
 >
 >>Sorry if this is a FAQ.
 >
 >>While network-installation is possible, can one also
 >>do network-backup? That is, back up files on one
 >>RS/6000 machine using tape-drives connected into
 >>another RS/6000 machine, where the two RS/6000
 >>machines are on the same ethernet running TCP/IP?
 >
 >>Thanks for your help!
 >
 >We're in the process of setting up a remote backup scheme.
 >Here's the meaty part of a script that may help.
 >(executes on a sun with tape drive using csh and 
 >backs up a risc running ksh)
 > 
 >set NTAPE=/dev/nrst1
 >set DUMP_OPT="-0 -f- -b124 -u"
 >(rsh -n remote_risc /etc/backup $DUMP_OPT /dev/hd4    | /usr/bin/dd of=$NTAPE obs=62k) >>& $LOGFILE
 >(rsh -n remote_risc /etc/backup $DUMP_OPT /dev/hd2    | /usr/bin/dd of=$NTAPE obs=62k) >>& $LOGFILE
 >...etc... each filesystem...
 
This is actually a good idea and one we use to backup about 30 differnt 
machines from differnt vendors ranging from AIX to SUN.  The nice benefit
from this approach is the ability to use each vendors backup utility.
On AIX it may be dump or backup, while other like older SGI's use bru.
With dump you can then restore using rrestore to the remote machine.
The only time the local machine needs root access on the remote tape 
machine is temporarily while the restore is being done.

We currently, run a script we call autobackup (written here) from one 
machine that has several auxillory scripts and a master list of machine 
names, a keyword to tell what backup command to run, and a list of 
filesystems.  It is a fairly reliable system and runs from cron each night.  
All we have to do is label a tape and put it in a drive to be done later 
that night.  Each night (wwekday) one monthly and am incrimental tape
is created.

To make a long story short, I would suggest that you role your own dd
equiv if you will be doing this at night from cron or something.  The
reason is that dd will NOT timeout and some network connections may die
and leave dd waiting for input, which has happened here!).  We have a 
program rolled here called tapebuf which works like dd with a blocksize 
of 10k.  (We use 10k because of a limitation on some machines we had when
this was written.)  The important difference is tapebuf times out and 
will log a dummy block on the tape if the connection dies.

 >It's pretty easy to turn the process around and issue "backup"
 >locally then pipe to "rsh ... dd", too.

This is true, but I would suggest the first instance if the machine
with the tape drive needs to be protected.  We backup many personnal
workstations where a prof or researcher may have root access, but we
do not necessarily want that person to have root access on the machine
with the tape drive.  You may be interested to know that rdump also
requires that the local machine have root access on the remote machine
with the tape drive.

 >----
 >-- 
 >Scott T. Cramer    Computer Resource Management, Inc. (CRM) / ACN-400C
 >FAA Technical Center, Atlantic City International Airport, NJ 08405
 >609/484-5958   scramer@faa.tc.faa.gov   scramer@faatcrl.Faa.Gov
 >TGF (Target Generation Facility, an Air Traffic Control Simulator) 



-- 
David Knight French		Email Addresses:		Phone:	
UCSD - Dept of Chemistry	INTERNET: dkfrench@ucsd.edu	  (voice/fax)
9500 Gilman Drive		UUCP:     ucsd!dkfrench		(619)534-4193 /
San Diego, CA  92093-0314	BITNET:   dkfrench@ucsd.bitnet	(619)534-6255
Newsgroups: comp.unix.aix