Page 1 of 1

rsync without shutting down scalix?

Posted: Mon Nov 01, 2010 4:28 am
by packets
It is advisable to shutdown scalix before doing any backup whether it is full or incremental. However, I want to clone scalix to another server using rsync without shutting off scalix. Losing emails late 1 hr is ok since I'll be doing rsync every hour. Is it ok to do this kind of setup? Any recommendation on how to setup a clone of scalix? My goal is to have a backup machine just incase the server is down.

Please note that I'll be doing full backup on my external hard drive and just want to setup another server acting as clone of the master server.

Re: rsync without shutting down scalix?

Posted: Mon Nov 01, 2010 4:36 am
by PrisonMind
hi,

search function :wink:
"Search found 39 matches: backup rsync snapshot"
e.g
http://www.scalix.com/forums/viewtopic.php?f=2&t=13676&hilit=backup+rsync+snapshot

Re: rsync without shutting down scalix?

Posted: Mon Nov 15, 2010 4:39 am
by packets
It seems it is not a good idea to do rsync while scalix is running. Most of the advise recommends to shut down scalix before doing rsync.

Though I tried to rsync the whole /var/opt/scalix to another machine and then copy the hosts file and ip address and I was able to mimic the machine. I was able to login and view all emails, calendar and contacts. Sad part is this is only a simulation. There's no traffic since I did this only using Virtualbox.

I stumble to this post http://www.scalix.com/forums/viewtopic.php?f=2&t=13831&p=61236&hilit=rsync+snapshot#p61236 and it was mention that mail corruption sometimes occur if the mail was on transit or being moved while rsync is currently running.

Any advise? I cannot afford to do rsync only midnight since this is only the time that there is no email traffic.

I cannot do LVM snapshot since the partition was not on LVM.

Re: rsync without shutting down scalix?

Posted: Tue Nov 16, 2010 5:39 am
by PrisonMind
hi,

maybe omsuspend could help you

Code: Select all

man omsuspend


did you use software raid?

Re: rsync without shutting down scalix?

Posted: Wed Nov 17, 2010 9:07 am
by packets
did you use software raid?


No.

maybe omsuspend could help you


As I check the man pages, it stall the connection of email client and any web activities. In short, scalix will not response and I cannot afford to do this. I cannot stop users in using scalix. My goal is to backup the folder every hour and I can do this using rsync. However, I cannot afford to shutdown scalix just to do rsync. I'm not sure since I've read here that there are some users of scalix that experience problem while scalix is up while doing rsync.

Re: rsync without shutting down scalix?

Posted: Thu Nov 18, 2010 4:30 am
by polleke
What you could do is make a bricklevel backup using the script that Dirk has created. This wil make a snapshot per mailbox and this you can import back into scalix.. this would not impact the users very much..

Would this help

Re: rsync without shutting down scalix?

Posted: Tue Nov 23, 2010 3:28 am
by Jakes
We use a combination of LVM snapshots and omsuspend, Scalix not affected for more than 15 seconds.

Extract from our backup script

Code: Select all

echo "Time taken to create LVM Snapshot, must not exceed 15 seconds:" >> $LOGFILE
#Suspend the Scalix service
/opt/scalix/bin/omsuspend -s 15 &
#Create LVM Snapshot
/usr/bin/time -f "\t%E" --output=$LOGFILE -a /usr/sbin/lvcreate -L10G -s -n scalixbackup /dev/Scalix/Scalix >> $LOGFILE
#Resume the Scalix service
/opt/scalix/bin/omsuspend -r
#Mount LVM Snapshot
/bin/mount /dev/Scalix/scalixbackup /mnt/scalixbackup/
#Sync Data to Backup Server
echo "Time taken to copy mail store to backup server:" >> $LOGFILE
/usr/bin/time -f "\t%E" --output=$LOGFILE -a /usr/bin/rsync -aH --delete $SCALIX_DIR $BACKUP_SERVER 2>> $LOGFILE
#Umnount LVM Snapshot
/bin/umount /dev/Scalix/scalixbackup
#Remove LVM Snapshot
/usr/sbin/lvremove -f /dev/Scalix/scalixbackup


Cheers
Jakes