[comp.unix.wizards] Dynamic dump level selection.

kjelle@erialfa.UUCP (Kjell Eriksson) (10/19/87)

Hi there, wizards. Here's a problem I have with backups.

Background:

We have a Sun 3/180 running SunOS 3.2 with two Eagles and one 1600 bpi
tapedrive.

We run unattended nightly backups by going to single user mode
sometime in the small hours and running a backup script. This is
started from crontab. The script is run from "/.profile".

We have daily, weekly and monthly backups that runs dump on level 6,
2 and 0 respectivly.

The goal is to keep the incremental backups on as few levels as
possible and one tape per night.

The Problem:

As the activity increases the risk of running out of tape also
increases. 

How do I determine which the lowest dump level is, that fits on one
tape.  I also want to know if I can't fit any dump into only one tape
and if so, switch to a manual backup.

A solution?:

A program that sums blocks and compare their modification dates
against the dates in the /etc/dumpdates.

Before I start hacking. Is there such a beast already? If so where can
I get it? Is there any other solution? (except buying a 6250 drive :-).

I know of one solution to the problem and that is to use dump and
send the output into /dev/null, but there are some problems with this.

a) I have to set the tape size to some very large value to avoid the
   tape switching (yes, on /dev/null :-).

b) It seems waste full to actually read the blocks and dumping them in
   /dev/null.

c) If there is to much data on one level, I have to rerun on the next
   level to see if it fits there.

Help and Thanks in advance

Kjell E.-- 
Kjell Eriksson			Phone: + 46 8 7937844 Telefax: 7509851
Ericsson Information Systems AB	Telex: 15968 ericki s
S-163 98  Stockholm		UUCP:  ...!mcvax!enea!erix!erialfa!kjelle
SWEDEN				       kjelle@erialfa.UUCP

merlin@hqda-ai.UUCP (David S. Hayes) (10/23/87)

In article <161@erialfa.UUCP>, kjelle@erialfa.UUCP (Kjell Eriksson) writes:
> The goal is to keep the incremental backups on as few levels as
> possible and one tape per night.
> 
> The Problem:
> 
> As the activity increases the risk of running out of tape also
> increases. 
> 
> How do I determine which the lowest dump level is, that fits on one
> tape.  I also want to know if I can't fit any dump into only one tape
> and if so, switch to a manual backup.


     Strip out the analysis routines from agef (see note).  These
routines can scan through your directories once, and sort the
files into different groups according to date of last change.  It
keeps a total of the sizes.  You can define the buckets as you
wish.  By defining them to be the date of the last level 0,1,2...9
dumps, it can tell you which dumps will fit on your tape.

Note: agef was originally designed to assist in management of news
spooling space.  It was published in comp.sources.unix, in volume
10 issue 100.  For those with Arpanet access, agef is available
from the sources archives on UUNET.UU.NET.  For those with only
UUCP access, I maintain a small archive available by anonymous
UUCP.  Email me for instructions.

-- 
David S. Hayes, The Merlin of Avalon	PhoneNet:  (202) 694-6900
UUCP:  *!uunet!cos!hqda-ai!merlin	ARPA:  ai01@hios-pent.arpa