Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Anyone have experience with backup of Domino 6 under Linux? - cron backup script
~Chloe Quetvelujip 27.Jan.03 08:36 AM a Web browser
Domino Server 6.0 Linux - RedHat, Linux - SuSE


Let's hope it appears ok.
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.




Anyone have experience with backup ... (~Karl Frojumige... 24.Jan.03)
. . RE: Anyone have experience with bac... (~George Cislute... 24.Jan.03)
. . . . but don't do that if you're using t... (~Tanita Asaboos... 25.Jan.03)
. . . . . . Why? (~Pippy Asaboosi... 25.Jan.03)
. . . . . . . . The data isn't written out to disk ... (~Tanita Zeklute... 27.Jan.03)
. . . . . . . . . . What does "as often" mean? (~Pippy Asaboosi... 27.Jan.03)
. . . . Tivoli supports it I believe (~Zach Fezfanali... 31.Jan.03)
. . RE: Anyone have experience with bac... (~Lily Minkither... 12.Mar.03)
. . RE: Anyone have experience with bac... (~Chloe Quetvelu... 25.Jan.03)
. . . . Anyone have experience with backup ... (~Richard Bubavi... 26.Jan.03)
. . . . . . RE: Anyone have experience with bac... (~Chloe Quetvelu... 27.Jan.03)
. . . . Please post if possible - (~Sean Preasterg... 26.Jan.03)
. . . . . . RE: Please post if possible - (~Chloe Quetvelu... 27.Jan.03)
. . . . RE: Anyone have experience with bac... (~Karl Frojumige... 27.Jan.03)
. . . . . . RE: Anyone have experience with bac... (~George Cislute... 27.Jan.03)
. . . . . . . . RE: Anyone have experience with bac... (~Chloe Quetvelu... 28.Jan.03)
. . . . . . . . . . RE: Anyone have experience with bac... (~Karl Frojumige... 28.Jan.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS