Subject: Re: How well does dump deal with active filesystems?
To: None <kenh@wrl.EPI.COM>
From: Mark P. Gooderum <mark@aggregate.com>
List: current-users
Date: 03/29/1994 14:29:38
> >I also find it annoying that I can't (easily) dump more than one file
> >system on a tape.  Do I really need a separate tape for my 16 meg root
> >partition?
> 
> Doesn't the non-rewinding tape device work?  I put 5-6 dumps on one tape,
> without any problems.

I do the same here.  Some dumps, notably Sun's 4.1, always rewind the
tape manually when done dumping.  To get consistent results just always
issue a rewind command (or use asf instead of fsf if your mt supports it).

BTW, to make things easy here we have a "do.dump" command that takes a
standard set of parameters (fs level tapefilenum host).  The host parameter
is optional.  The script looks like:

mt -f `/usr/local/etc/tapedev.cmd.hd` rewind
mt -f `/usr/local/etc/tapedev.cmd.hd` fsf $3

dumpcmd=dump $2cdsbfu 108000 6000 126 $4`./tapedev.cmd.hd` $1
echo $dumpcmd | tee -a /local/temp/backup.dump
$dumpcmd
echo "`./date.cmd` - `/bin/hostname`:$1 - Level $2 - Tape File $3" | tee -a /local/temp/backup.dump

Note that keeping a history of the dumps is useful since if you add an fs
to the dump, you can just go back to the file to know which one it is on
a tape for a given day.

To make it easier to move between systems each sytem has a script that
echos the correct device name (useful here where we have SunOS, Solaris, 
HPUX, and AIX (and my NetBSD at home)).

Then your backup script just looks something like:

#Daily backup
dodump / 	5 0
dodump /usr 	5 1
dodump /export  5 2

If you backup is goes to a remote host it becomes:

dodump / 	5 0	tapehost:
dodump /usr 	5 1	tapehost:
dodump /export  5 2	tapehost:

If you need to restore just make sure you issue the tape space command
before running restore (and always do a "what" to double check which fs you
have if running interactive).

-Mark


------------------------------------------------------------------------------