Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Backup on Linux
  •  
james.wti

Messages: 9
Karma: 0
Send a private message to this user
We're a Kerio reseller, and we've been putting in Kerio Mailserver/Kerio Connect systems for our customers for a couple of years now. Up until now we've only been installing Kerio on Windows systems for our customers, but I've been looking into Kerio on Linux for the cost savings (dropping the $700 Windows license makes Kerio look MUCH more attractive to our customers). However, one concern I've been having is with the backup strategy.

I'm curious about how the Linux guys out there handle backup. I've got some experience with Linux but am by no means an expert. With our Windows boxes, we use a program called BackupAssist to back up Kerio (along with everything else). With Linux I've looked into two different approaches - Kerio's built-in backup system and rsync scripts.

I wrote an rsync script to back up the mailserver data on a test box we run internally, and it seems to work fine, but I have no good way to monitor it (short of emailing myself a log file, which becomes inelegant for a large number of customers).
I also tried configuring Kerio to back itself up, but I'm limited with this approach - I can back it up locally, which doesn't really help in the event of a drive failure, or I can back up to an external hard drive, which is probably the best solution I've come up with so far. I'd like to have the ability to back up to a (preferably Windows) network target, but I noticed a limitation with that approach - I set up a persistent mount point to an SMB share using CIFS, and it works fine with Kerio's backup, but if for whatever reason the system loses the mount point (if the target server goes offline, for example), Kerio backs itself up to the empty mountpoint, rather than throwing an error.

All you Linux gurus out there, what kind of approach do you use to back up Kerio on a Linux platform, and what kind of monitoring/error reporting do you use?
  •  
id t

Messages: 50
Karma: 0
Send a private message to this user
I backup the kerio mailstore like this:

time /usr/local/bin/rsync -rtumzhv  --progress --delete-after --exclude=Outbox --exclude=backup --exclude=tmp --exclude=logs --exclude=archive --exclude=queue --ignore-errors root@mail:/mailstore /Volumes/Mail_backup/


this rsync runs on the backup machine (XServe 10.6, with rsync 3.0.7 compiled from source) and it's wrapped into a bash script which in turn is executed by a plist file in /Library/LaunchDaemons. I backup every 4 hours and it takes about 12 minutes (700GB mailstore, 4+ millions files, 160 users). You have to do ssh-keygen on the target and transfer the keys back to the mail server.

The advantage is that if the Linux server fails (in fact, it's a VM running on a ESXi host) I can start Kerio on the XServe and change DNS to have an almost online failover (4 hrs max of lost emails).
  •  
james.wti

Messages: 9
Karma: 0
Send a private message to this user
That's more or less the same thing as I'm doing now internally. Below is a snippet from my backup script, which is run as a cron job:

rsync -avzF /opt/kerio/mailserver wti<_at_>wtiback2.wti.local:/srv/backup/WTI/kerio >> /root/kerio.log


Then later in the script I email the log to myself:

mutt (myemailaddress) -a /root/kerio.log -s "Backup Report - `date +%F` - wtikc1.wti.local" < /root/kerioreport.txt


That works fine for us internally, but I'd rather not have a whole bunch of customer Kerio servers out there individually emailing me backup logs every night (if I can avoid it). I'd love to find a good way to make Kerio's internal backup process go out to a network location, but I have a feeling there's not going to be a foolproof way to do that on Linux.
  •  
GlennK

Messages: 252
Karma: 3
Send a private message to this user
Hey you guys, how do you deal with the Kerio licensing? I'd like to have a similar config. Are you rsyncing the kerio config as well and just leaving Kerio off on the target? I'm concerned a reboot on the target computer would cause a major conflict with the main mail server.
  •  
GlennK

Messages: 252
Karma: 3
Send a private message to this user
not to mention outgoing mail, etc.
  •  
james.wti

Messages: 9
Karma: 0
Send a private message to this user
I'm not rsync'ing to an actual, live Kerio server. I'm basically just backing up the entire /mailserver directory to a remote backup server. I'd still have to restore to a new (physical or virtual) server before I'd be back up and running in the event of a failure. I'm mainly using rsync for my off-site backup, for on-site backup I still rely on Kerio's built-in backup system.
I would imagine, however, that it would not be tremendously difficult to have a cold-spare system already preconfigured as a Kerio server, and just run an rsync job to it regularly. I don't think licensing would be an issue, assuming you're using the same architecture (Win or Linux) and you don't bring the cold-spare system online while the original system is running.
  •  
GlennK

Messages: 252
Karma: 3
Send a private message to this user
As it is now, I have a local drive clone I can boot from that will function much the same as your solution. If necessary I can even grab that drive and jam it into another xserve. Since it is boot, data and all, I am ready to fly.

Although of course I'm curious about being able to have an entire computer backup I can switch to remotely, no need to come to data center. Maybe this is a bit ambitious and we would probably end up there anyway to trouble shoot.

Here's an idea. Rsync the entire drive to the backup computer, but not to the main drive. Do it to a secondary drive. In case of crisis, remote into the backup computer, tell it to boot off of secondary drive and there you go!! I think this might be a winner.

Not only that, but an Xserve can actually act as a backup for 2 servers since it has 3 drives. Drive 1: boot, Drive 2: Mail clone, Drive 3: Web server Clone. In case of crisis, remote in and select your startup disk and reboot. Go to the data center later for followup damage control.
  •  
vomsupport

Messages: 136
Karma: 2
Send a private message to this user
Take a look at rsnapshot...

Simple rsync frontend

  •  
mh

Messages: 16
Karma: -5
Send a private message to this user
I use some comercial backup software ... but I think it's not important what kind of software you use to copy files ... rsyc is cool and I use it every where. What I want to add is some thing different:

I do NOT use the Kerio built in backup function on it's own. OK, I create backups using it for disaster recovery. But have you tried to restore a singel mail using the built in backup ? In addition to the Kerio backup I do complete - consistent (!!) - backups on a file base with my backup software. To do so you first have to plan you setup. My tip: ALLWAYS use LVM ! If you do so, you can do the following:

- stop Kerio
- create a LVM snapshot
- start Kerio
- do the backup
- drop the snapshot

The down time while doing the snapshot on my systems is usually less than 1 minute. Bringing down Kerio is what takes the moste time.

[Updated on: Sat, 18 December 2010 00:02]

Previous Topic: Trouble with the Kerio Connector & Outlook 2010 - "Opening of profile failed." 0x80040
Next Topic: Problem to send mails to hotmail
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Thu Nov 23 17:36:10 CET 2017

Total time taken to generate the page: 0.00407 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.