Incremental GroupWise Database Backups
I was working on a project to replicate all user data from 22 school sites into one central storage server, using RSYNC and replicating to a SLES 10 OES2 server.
I thought while I was at it I would replicate my GroupWise databases at the same time, providing an off-site backup.
I decided to use DBCOPY to backup the the data. However, without using the /I switch, DBCOPY would backup the entire database when all I wanted was new data to be backed up each night. Also, I wanted to automate the process with CRON so it would run unattended.
But how does one set a new paramenter for a switch in NetWare, which is the OS for my GroupWise system?
I finally realized that I could set a variable for DATE in a BASH shell, and then run DBCOPY using the /i $DATE switch which makes DBCOPY do an incremental backup. I then wrote the attached scripts, one for the Domain, and one for each Post Office. I schedule them to run at separate times in CRONTAB by calling BASH /path/to/script. This avoids having multiple instances of DBCOPY running at the same time and provides me with current data to RSYNC from the backup directory.
Here are sample crontab entries:
0 19 * * * bash sys:/etc/dombkup.sh
30 19 * * * bash sys:/etc/distbkup.sh
30 20 * * * bash sys:/etc/mainbkup.sh
0 2 * * * sys:/rsync/domainbu.ncf
15 2 * * * sys:/rsync/mainbu.ncf
0 4 * * * sys:/rsync/distbu.ncf
The NCF files are simple RSYNC commands as documented in Cool Solutions that send the data to the SLES server.