Page 1 of 1
Backup
Posted: Tue Nov 15, 2005 12:20 pm
by Jason Warren
Hi,
Can anyone tell me the best backup solution for Scalix on a Redhat 3 ES server.
Any feedback much appreciated.
Best Regards,
Posted: Tue Nov 15, 2005 5:13 pm
by mpeters
Hi Jason,
Are you wanting to backup to tape or a separate file/storage server?
I use a scheduled rsync job to backup the information store to a remote server nightly and it works like a charm. (After stopping the Scalix services and then restarting them when the backup is done)
Cheers,
Michael
Backups.
Posted: Tue Nov 15, 2005 5:34 pm
by kanderson
Here's a script I use.
It does NOT archive public folders, but it greatly simplifies restores, as I simply throw up a new mailnode called restore, and then use omcpinu to copy the user in.
I'm a hideous coder, but it does work.
In this example, I'm creating a backup directory called /var/opt/current and then copying everyone in the calgary mailnode into there. This will create an USERNAME.OUT file for each person in the mailnode.
It will also cycle the backups for a series of days so that you always have a weeks worth of backups on hand. Obviously, you'll want to write this to tape.
There are several things to note here.
1) I am turning off remote connections. This means that people cannot connect to the server during the backup procedure.
2) This does not archive anything in a public folder.
3) This fails for people with more than 2 Gigs of email data.
4) If you use multiple mailnodes, this needs to run for each of them.
5) I would recommend also adding a line such as:
tar -zcvf /var/opt/current/ScalixBackup.tar.gz /var/opt/scalix /etc/opt/scalix
this WILL get public folders, and >2Gig email folders., but it's ugly to restore from.
There is a knowledgebase article on archiving and backing up data. It's a worthwhile read. Hopefully this script also offers some value. Obviously adding a few variables at the beginning would simplify setting it up for different locations.
=========================================
omoff -d 0 rci
rm -rf /var/opt/7old
mv /var/opt/6old /var/opt/7old
mv /var/opt/5old /var/opt/6old
mv /var/opt/4old /var/opt/5old
mv /var/opt/3old /var/opt/4old
mv /var/opt/2old /var/opt/3old
mv /var/opt/1old /var/opt/2old
mv /var/opt/current /var/opt/1old
mkdir /var/opt/current
chmod 0700 /var/opt/current
date > /var/opt/current/starttime
chown root:root /var/opt/current
date > /var/opt/current/starttime
chown root:root /var/opt/current
touch /var/opt/current/mailbackupscript
chmod 0700 /var/opt/current/mailbackupscript
/opt/scalix/bin/omshowu -m calgary > /var/opt/current/userlist
sed -e 's/\ \/calgary\/CN=/\"\ -f\ \"\/var\/opt\/current\//g' -e 's/^/\/opt\/scalix\/bin\/omcpoutu\ -n\ \"/g' -e 's/$/\.out\"/g' /var/opt/current/userlist > /var/opt/current/mailbackupscript
/var/opt/current/mailbackupscript > /var/opt/current/logfile.txt
mv /var/opt/scalix/log/audit /var/opt/current/
omon rci
date > /var/opt/current/endtime
============================
Posted: Wed Nov 16, 2005 10:46 am
by Jason Warren
Michael,
thank you for your reply. I need to be able to take the backups off site and only have a small window of opportunity to archive the data, so I had thought about using a USB external hard disk, but not sure how reliable this would be on a Redhat 3 ES server.
The server currently holds approx 9Gb of client data.
Any advice on how to quickly archive the data to an external device would be much appreciated.
Best Regards,
Archive
Posted: Wed Nov 16, 2005 12:25 pm
by kanderson
If you want to do a really fast full backup, go to the knowledgebase, and search for Logical Volume Manager.
This will show you how to set up LVM for the Scalix partition, which will then allow you to take a snapshot of the file system. This process takes less than a minute, and will then allow you to archive the system while it is up and running. You could either create a tarball of the Scalix data and scp that off the box, or use rsync as Michael suggested. The advantage of LVM is that the Scalix services only need to be unavailable for a minute or so.
Kev.
Posted: Tue Nov 22, 2005 7:41 am
by jch
As Kev says, look up the stuff on the LVM in the knowledge base (hmmm ... must do that myself one day).
The critical command that scalix provides is omsuspend -- it suspends all message store activity for up to five minutes. This was created to allow, for example, snapshots to be taken or mirrors split. There's an example in the omsuspend man page, though personally I'd add a sleep after the omsuspend to wait for all the currently running operations to complete.
jch
Posted: Fri Jan 27, 2006 8:46 pm
by traydeezy
How would you restore an individual users mailbox if you backuped the /var/opt/scalix directory?
Thanks.
Posted: Fri Jan 27, 2006 8:56 pm
by kanderson
With great difficulty. :)
I actually do 2 backups.
I omcpoutu each user, and archive that. This is easy and fast to restore from, and it's convienient.
I also backup up the whole message store. This way, I have a backup of everything including the BulletinBoards/Public Folders.
Kev.
Posted: Sun Jan 29, 2006 2:26 pm
by florian
;-) well, i guess someone needs to be visiting our advanced trainings here so to manage what they call difficult - you're invited, kevin! :-)
actually, kevin is quite right - for smaller installations that can actually afford the extra disk and tape space to also do a export-driven backup, this is probably the simplest solution.
all others should be reading the document on ISDB, ISS and single user restore that can be found in our Knowledgebase. This is what it needs to restore a user's mailbox from a full backup.
cheers,
Florian.