[OpenAFS] Automated backups

Cees de Groot cg@cdegroot.com
27 Feb 2002 22:20:53 +0100


Martin Schulz <schulz@iwrmm.math.uni-karlsruhe.de> said:
>> The script consists of simple invocations of vos and backup. What's the best
>> way to run these from a crontab?
>
>Use the -localauth option if you're root on the server anyway? 
> 
>> OBTW, I'm using Heimdal if that makes a difference.
>
>Dunno.
>
I'm mentioning it because I recall having -localauth problems with it. But it
could be that I'm just making it too hard for myself, I'll make sure that I
try this for good measure :-)

>Could you make your script acessible anywhere? How do you handle the
>butc process? Perhaps there is something, we (or others) could use
>without perpetually reinventing the wheel...
>
The backup script is quite simplistic: 

#!/bin/sh
day=$(date +%A)
vos backupsys -verbose
cat backup.$day | sed 's/^/backup dump /' | sh
backup savedb

It is accompanied by per-day input files, like backup.Sunday:

binaries /Saturday/Sunday 0
user.nl  /Sunday 0
svc.ep-1  /Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday 0

I have defined dump schedules for all days (ie, 7 dump schedules, each with
the full level on a different day and incrementals on the others), so with the
per-day input files (themselves quite amenable to maintenance with simple
scripts) I can nicely load-balance the backup load. So, for the 'binaries'
set, I have lines in the files:

backup.Saturday:binaries /Saturday 0
backup.Sunday:binaries /Saturday/Sunday 0
backup.Monday:binaries /Saturday/Sunday/Monday 0
backup.Tuesday:binaries /Saturday/Sunday/Monday/Tuesday 0
backup.Wednesday:binaries /Saturday/Sunday/Monday/Tuesday/Wednesday 0
backup.Thursday:binaries /Saturday/Sunday/Monday/Tuesday/Wednesday/Thursday 0
backup.Friday:binaries /Saturday/Sunday/Monday/Tuesday/Wednesday/Thursday/Friday 0


butc is indeed a problem as well. It seems to need a lot of rights as well,
and doesn't undesrtand -localauth. As I never need to interact with it (all
backups are made to file, these files are copied some time later in the night
to off-site storage), I can probably fire it up just before the backup script
and kill it when I'm done. 
-- 
Cees de Groot               http://www.cdegroot.com     <cg@cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B