rsync without shutting down scalix?

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

packets
Posts: 48
Joined: Mon Nov 16, 2009 4:56 am

rsync without shutting down scalix?

Postby packets » Mon Nov 01, 2010 4:28 am

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.

PrisonMind
Posts: 308
Joined: Thu Jul 10, 2008 5:00 am
Location: Adua

Re: rsync without shutting down scalix?

Postby PrisonMind » Mon Nov 01, 2010 4:36 am

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

packets
Posts: 48
Joined: Mon Nov 16, 2009 4:56 am

Re: rsync without shutting down scalix?

Postby packets » Mon Nov 15, 2010 4:39 am

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.

PrisonMind
Posts: 308
Joined: Thu Jul 10, 2008 5:00 am
Location: Adua

Re: rsync without shutting down scalix?

Postby PrisonMind » Tue Nov 16, 2010 5:39 am

hi,

maybe omsuspend could help you

Code: Select all

man omsuspend


did you use software raid?

packets
Posts: 48
Joined: Mon Nov 16, 2009 4:56 am

Re: rsync without shutting down scalix?

Postby packets » Wed Nov 17, 2010 9:07 am

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.

polleke
Posts: 80
Joined: Thu Feb 28, 2008 6:09 am
Location: the Netherlands
Contact:

Re: rsync without shutting down scalix?

Postby polleke » Thu Nov 18, 2010 4:30 am

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
Kind regards,

Paul

Jakes
Posts: 45
Joined: Tue May 15, 2007 8:11 am
Location: Johannesburg, South Africa

Re: rsync without shutting down scalix?

Postby Jakes » Tue Nov 23, 2010 3:28 am

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


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 4 guests