Moderators: ScalixSupport, admin
Code: Select all
tar -cf backup.tar /var/opt/scalix
Dimitriy wrote:Does anyone see any problems with using a Naslite Box as a backup?
Naslite doesnt keep permissions as far as i can tell. Is there a way around it?
Dimitriy wrote:What would be a simple script that would do the following:
1. Backup all the needed folders/files every day. By backup I mean create a proper tarball.
2. Transfer the tarball by FTP or NFS to a server. Overwrite the old copy.
And I think thats it. Should there be anything else that it should do? The main reason for this backup is just to ensure that the we have a backup of our emails in case our mailserver harddrive croaks. We just want to be able to recover the data from a fairly recent time.
Any help?
Dimitriy
Code: Select all
BACKUP_DATE=`date '+%F' --date '1 day ago'`
REMOVE_DATE=`date '+%F' --date '5 days ago'`
BACKUP_DEVICE=/backup/$BACKUP_DATE-backup.tar
REMOVE_DEVICE=/misc/mail_backup/$REMOVE_DATE-backup.tar
/opt/scalix/bin/omshut 2>&1 >> $MAINTLOG
tar -cf $BACKUP_DEVICE /var/opt/scalix 2>&1 >> $MAINTLOG
/opt/scalix/bin/omrc 2>&1 >> $MAINTLOG
mv /backup/2* /misc/mail_backup/$BACKUP_DATE-backup.tar
davidz wrote:This is what we do. Here is the simple shell script we use:Code: Select all
date
/opt/scalix/bin/omshut
sleep 60
rsync -auv --delete /var/opt/scalix /mnt/EmailBackup
/opt/scalix/bin/omrc
date
Pretty much just outputs the current Date/Time so we can track how long it is taking to run. Then it stops the server, wait 60 seconds for the server processes to stop, then rsync all the data to another system. Start the server back up and output the Date/Time it finished.
Currently we have about 35 gigs in the mailstore and the rsync takes less than 10 minutes. We run this every night. The first rsync obviously took longer, but the update each night is fast. And the backup location is on a completely separate server. (NFS mount).
Just my two cents!
--David
PS. I have restored from this with no problems (hard drive died). Just install new Hard Drive, install Linux (whichever you use). Copy mailstore back from backup. Install Scalix Server. It detects existing mailstore and everything worked great. That's overly simplified but you get the idea.

LHD-Tech wrote:Code: Select all
/opt/scalix/bin/omshut 2>&1 >> $MAINTLOG
tar -cf $BACKUP_DEVICE /var/opt/scalix 2>&1 >> $MAINTLOG
/opt/scalix/bin/omrc 2>&1 >> $MAINTLOG
mv /backup/2* /misc/mail_backup/$BACKUP_DATE-backup.tar
davidz wrote:This is what we do. Here is the simple shell script we use:Code: Select all
date
/opt/scalix/bin/omshut
sleep 60
rsync -auv --delete /var/opt/scalix /mnt/EmailBackup
/opt/scalix/bin/omrc
date
Code: Select all
omsuspend
lvmcreate ...
omsuspend -r
$backup_cmd
Users browsing this forum: No registered users and 3 guests