Source:
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/8505bc9a7e18099d85256cbb002f47ea?OpenDocument

Backup Cron Script for Linux:
Posted by Salvador Gimeno on 27.Jan.03 at 03:36 AM using a Web browser


___________________________________________________


Things you should know:
/etc/init.d/domino/. That's the script used to start/stop the Domino server. 
It's taken from IBM's RedBook about Domino 5 on Linux. AFAIK there's an 
identical script for Domino 6, but I haven't tested it.
/var/log/copias.log is a text file where we log the backup, just in case there 
is any trouble. You don't need to create it, it will be created as soon as the 
script is executed.
//192.168.0.5/copiadomino. That's the IP of the server with the shared folder. 
copiadomino is the name of the folder. (I'm Spanish, I've translated some parts 
of the script, but I haven't changed some names, just in case you are asking 
about the names used ;) ).
b>/mnt/copia</b>]. It's an empty Linux folder where we mount the shared 
folder.
Note: our firewall doesn't allow any conections to these servers. If they are 
on the internet, you can have the user+password in a text file that can only be 
read by root. You should use that.
Here is the script. It should be installed in /usr/local/bin (that's the place 
for scripts/execs installed manually by the admin). Remember to make it 
executable (chown +x file)

copiadomino-------------------------------------

#!/bin/bash
# Program to backup the Domino Server

echo "`date`: Starting backup" >> /var/log/copias.log

#We stop the Domino Server
/etc/init.d/domino stop 1>> /var/log/copias.log 2>&1
sleep 10

#We mount the network share
smbmount //192.168.0.5/copiadomino /mnt/copia -o 
username=someuser,password=hispassword,ip=192.168.0.5 1>> /var/log/copias.log 
2>&1
#Let's copy :-)
tar cvzf /mnt/copia/domino.tar.gz /local/notesdata 1>> /var/log/copias.log 2>&1

#We start Domino again
/etc/init.d/domino start 1>> /var/log/copias.log 2>&1

echo "`date`: The backup has finished" >> /var/log/copias.log

-----------------------------------------------

As you might have guessed, we don't want our logs to grow too big, so we 
compress them every week, and we delete them when they are 5 weeks old. To do 
it, we have added the following file in /etc/logrotate.d/:
copias-----------------------------------------
/var/log/copias.log {
missingok
weekly
compress
}
-----------------------------------------------
Note: some old distros (SuSE 7.1 comes to mind) don't install logrotate by 
default.

And finally, we have to configure cron to execute our script. Just modify your 
/etc/crontab file to look similar to this (the last line is the important one):
crontab----------------------------------------
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly
02 23 * * 1-5 root /usr/local/bin/copiadomino
-----------------------------------------------
Note: we could have created a script in /etc/cron.daily and it would have been 
executed daily as specified in the second line. However, we prefered to specify 
our own comnfiguration for it. For example, on Saturday & Sunday, the tape is 
not changed, so there was no point in backing it up, as something wrong could 
happen on saturday, and the backup would overwrite the friday backup before we 
could react. The first columns in crontab work as follow: minute - hour - day - 
month - weekday. Just modify them to suit your needs. We haven't niced our 
script as it should be the main thing executing at that moment.

I hope this helps you. The script is far from perfect, so if anybody makes it 
better, please post it here!! Also, if anyone has any questions about it, just 
ask.

Final note:
If you want to backup to a tape device, replace the smbmount and tar lines of 
the script with this one:
----------------------------------------------
tar cvzf /dev/st0 -V "`date +"%A %D"`" /local/notesdata 1>> /var/log/copias.log 
2>&1
-----------------------------------------------

/dev/st0 is the first SCSI tape in the computer, you might have to change it.

Salva.

P.S. If you want any more info about administering Linux, I recomend you this 
book:
http://www.oreilly.com/catalog/lpicertnut/
Forget about the fact that it's about getting certified in Linux. It's a great 
reference manual and it's very useful at learning the important things needed 
to administer Linux systems.