[OpenAFS] Cleaning up the backup-db
Chris Huebsch
chris.huebsch@informatik.tu-chemnitz.de
Thu, 30 Jun 2005 12:08:03 +0200 (CEST)
Hello,
I am using the integrated afs-backup for a file-based backup-system.
I have 3 AFS-Servers with each 400 GB of diskspace.
(afs1, afs2, and afs3)
I have the following vol-sets:
|Volume set user1:
| Entry 1: server afs1, partition vicepa, volumes: user\..*\.backup
|
|Volume set user2:
| Entry 1: server afs2, partition vicepa, volumes: user\..*\.backup
|
|Volume set user3:
| Entry 1: server afs3, partition vicepa, volumes: user\..*\.backup
|
|Volume set media:
| Entry 1: server .*, partition .*, volumes: media\..*
| Entry 2: server .*, partition .*, volumes: media
|
|Volume set www:
| Entry 1: server .*, partition .*, volumes: www\..*
| Entry 2: server .*, partition .*, volumes: www
|
|Volume set admin:
| Entry 1: server .*, partition .*, volumes: root\..*
| Entry 2: server .*, partition .*, volumes: home
| Entry 3: server .*, partition .*, volumes: admin\..*
| Entry 4: server .*, partition .*, volumes: admin
|
|Volume set ftp:
| Entry 1: server .*, partition .*, volumes: ftp\..*
| Entry 2: server .*, partition .*, volumes: ftp
(I know, there is a little bit redundancy in it...)
I have the following dumpsets:
|/Sunday2 expires in 21d
| /Monday2 expires in 14d
| /Tuesday2 expires in 14d
| /Wednesday2 expires in 14d
| /Thursday2 expires in 14d
| /Friday2 expires in 14d
| /Saturday2 expires in 14d
|/Sunday1 expires in 21d
| /Monday1 expires in 14d
| /Tuesday1 expires in 14d
| /Wednesday1 expires in 14d
| /Thursday1 expires in 14d
| /Friday1 expires in 14d
| /Saturday1 expires in 14d
|/Sunday0 expires in 21d
| /Monday0 expires in 14d
| /Tuesday0 expires in 14d
| /Wednesday0 expires in 14d
| /Thursday0 expires in 14d
| /Friday0 expires in 14d
| /Saturday0 expires in 14d
I do a file-based backup, with all 3 AFS-Server serving as bupc-Server.
The backup is initiated by a cron-job:
|WEEKNUM=$(($(date +"%U") % 3)) #find the number of the week mod 3
|DAY=$(${DATE} +"%A") #name of the day
|
|JOBFILE="/tmp/$$.afsbackup"
|if [ $DAY = "Sunday" ] #full backup on Sunday
|then
| # volset dumplevel dumptarget
| cat <<EOF > $JOBFILE
| dump user1 /${DAY}${WEEKNUM} 2
| dump user2 /${DAY}${WEEKNUM} 3
| dump user3 /${DAY}${WEEKNUM} 1
| dump media /${DAY}${WEEKNUM} 3
| dump www /${DAY}${WEEKNUM} 3
| dump admin /${DAY}${WEEKNUM} 2
| dump ftp /${DAY}${WEEKNUM} 2
|EOF
|else #incremental backup on weekday
| # volset dumplevel dumptarget
| cat <<EOF > $JOBFILE
| dump user1 /Sunday${WEEKNUM}/${DAY}${WEEKNUM} 2
| dump user2 /Sunday${WEEKNUM}/${DAY}${WEEKNUM} 3
| dump user3 /Sunday${WEEKNUM}/${DAY}${WEEKNUM} 1
| dump admin /Sunday${WEEKNUM}/${DAY}${WEEKNUM} 2
|EOF
|fi
|
|$BACKUP -file $JOBFILE 2>/dev/null >/dev/null
|backup savedb 1 -localauth 2>/dev/null >/dev/null
|backup savedb 2 -localauth 2>/dev/null >/dev/null
|backup savedb 3 -localauth 2>/dev/null >/dev/null
Now the dump-records start to pile up.
My dumps do have an expiry-time. According to "Removing Obsolete Records from
the Backup Database", old records are deleted, when the tape is
recycled. But I do not have tapes!
So I tried 'backup deletedump -to "..."'. The ordinary dump-records can be
deleted this way. But the Ubik_db_dump-records stay in the db:
1115452908 0 0 05/07/2005 10:01 1 0 Ubik_db_dump
I have to delete them with:
'backup deletedump -id "$id"'
That is very annoing, because it will complicate my scripts a lot.
Is there a better way doing this?
Is it a bug or a feature?
Chris
--
Chris Huebsch www.huebsch-gemacht.de | TU Chemmnitz, Informatik, RNVS
GPG-Encrypted mail welcome! ID:7F2B4DBA | Str. d. Nationen 62, B204
Chemnitzer Linux-Tage 2006, 4.-5.Maerz | D-09107 Chemnitz
http://chemnitzer.linux-tage.de/ | +49 371 531-1377, Fax -1803