[OpenAFS] backing up afs

Christian Pfaffel flash@itp.tu-graz.ac.at
23 Jul 2003 17:24:27 +0200


--=-=-=

Ron Croonenberg <ronc@DEPAUW.EDU> writes:

> Hello,
> 
> Well it seems I got backing up AFS volumes working.
> 
> I am dumping afs .backup volumes to a file, and used the options (as mentioned
> in the docs) so that butc isn't asking to hit return after a tape is put in.
> 
> Everything worked fine when I was working with a volumeset for testing, but
> apparently butc does start asking when a 2nd tape (???? I am dumping to a file
> ?) needs to be inserted. I know I am dumping to a file, I can see that from a
> log file.
> 

You have to use a tape mounter script that handles the change of
files. I have attached the one we are using. Backups are stored in
the directory '/backup/$tapeid'


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=tape_mounter
Content-Description: tape mounter script

#!/usr/bin/perl

($dev, $op, $tries, $tapename, $tapeid) = @ARGV;

$ERR_ABORT = 1;
$ERR_INTERACTIVE = 2;

$tries > 1 and warn "Number of tries $tries > 1" and exit $ERR_INTERACTIVE;

if ($op =~ /dump|appenddump|restore|savedb|restoredb/){
  system "/bin/rm -f $dev";
  $dev =~ /(\d+)/ and system "/bin/ln -sf /backup/$1/$tapename\_$tapeid $dev";
  $? >> 8 and exit $ERR_ABORT;
  exit 0;
} elsif($op =~ /labeltape|readlabel|scantape/) {
  warn "Operation not permitted/useless on tapefiles" and exit $ERR_ABORT;
} else {  warn "unknown operation $op" and exit $ERR_INTERACTIVE}

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


The backupdevice has to be configured properly in
'/usr/afs/backup/tapeconfig'. In the e.g. it is $tapeid 2. We split our
dumps to 1G parts.

1024m   0       /dev/AFSBACKUP2 2

Then there has to be the configuration for the backupdevice in
'/usr/afs/backup/CFG_AFSBACKUP2'

MOUNT /afs/itp.tugraz.at/common/local/bin/tape_mounter
ASK NO
FILE YES

Hope this helps,

Christian

-- 
Christian Pfaffel <flash@itp.tu-graz.ac.at>
Technische Universität Graz                 Telefon: +43 / 316 / 873 - 81 90
Institut für Theoretische Physik            Telefax: +43 / 316 / 873 - 86 78
Petersgasse 16, A-8010 Graz   http://fubphpc.tu-graz.ac.at/~flash/pubkey.gpg

--=-=-=--