1

Topic: iRedMail Backup in a Production Server

The following questions are aimed at mail admins  who already use iRedMail in a production environment serving more than 500 users.

MySQL Databases:

1. What kind of backup are you using to backup the mysql databases involved?
   (for example mysqldump, your own script or any third party software etc)

2. At what frequency or time-intervals you are doing the backup?
(for example every n minutes, hourly, daily etc). If possible please give details about your full, incremental, differential backup periods during which you are doing the backup.

Mailboxes:

1. What kind of backup are you using to backup the mailboxes? (for example tar, backup software, rsync etc)

2. At what frequency or time-intervals you are doing the backup? (for example every 15 minutes, hourly, daily etc). If possible please give details about your full, incremental, differential backup periods during which you are doing the backup. 

Thanks in advance for the replies.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by demo 2010-10-25 01:02:26)

Re: iRedMail Backup in a Production Server

1. Using my own bash script with mysqldump, its buckup every night, allways have 1 week backup.
2. Using Symantec Backup Exec, its just backup /var/vmail. Differential backup every night and full buckup at Sat.

3 (edited by robertut 2010-10-25 02:30:14)

Re: iRedMail Backup in a Production Server

I use it inside a virtual machine (virtualbox). For now a weekly backup of the entire virtual hard disk on the host os, with a simple copy. The virtual machine has to be suspended during copy, that's just a few seconds off the network. The virtual hd has inside all: mails, db, configs, entire os of the mail system.

This is good because it stays hardware independent. If hardware fails, just pick another (even Windows) pc, start the vm there and you're back with original service in minutes, with minimal fallout.

4

Re: iRedMail Backup in a Production Server

Here's backup scripts used to backup MySQL database and LDAP data:
http://www.iredmail.org/wiki/index.php? … FAQ/Backup

5

Re: iRedMail Backup in a Production Server

Thanks for your replies.

ZhangHuangbin I already have the script and have since incorporated into my custom backup script for doing MySQL database backup every hour. Am using "rsync" for mirroring the mailbox directory which copies modified files to the backup server every 5 minutes over SSH. Am still in a test environment (just 2 systems) where this setup is working perfectly but I like to know whether this is the right thing to do (i.e mirroring or copying files every 5 minutes) in a production environment serving 500 mail users?.

6

Re: iRedMail Backup in a Production Server

Hi !

I'm trying some backup methods, but backup /var/mail fails.
Is backup using backuppc to backup /var/mail enough ?

When I restore tar file, I log on my user account, but no mail in the mailbox. Only folders I created are still present.

I followed this "tutorial" : Tuto. Mysql backup and restore is ok, conf files too.

What am I doing wrong ? Is there something special to do ?

Thanks for replies smile

7

Re: iRedMail Backup in a Production Server

robertut wrote:

I use it inside a virtual machine (virtualbox). For now a weekly backup of the entire virtual hard disk on the host os, with a simple copy. The virtual machine has to be suspended during copy, that's just a few seconds off the network. The virtual hd has inside all: mails, db, configs, entire os of the mail system.

This is good because it stays hardware independent. If hardware fails, just pick another (even Windows) pc, start the vm there and you're back with original service in minutes, with minimal fallout.

I'm using iRedMail with VmWare Server on a Win7 "SuperPC" and VmWare Server (free version)
I'm asking myself if this solution is "official" and "enterprizable" ?

Backup VM machine is one thing, but if your machine fails because of a update of linux (lived...),for example, you are in the same case like you did a monthly backup (if you plan monthly backups smile)...

I think make 2 ways of backup is imperative.

8 (edited by hansolo 2010-11-08 05:58:14)

Re: iRedMail Backup in a Production Server

I'm sorry for late reply, but in my case I can say that TAR has successfuly backup the user's mailboxes in /var/vmail with all subdirs (new, cur, ...) and email files in it.

try:

/usr/tmp/mybackup_dir> # tar pczvR --exclude=tmp -f user_emails.tgz /var/vmail

This keeps the directory structure and files in it.

You can also backup MySql database with it (I do):

/usr/tmp/mybackup_dir> # tar pczvRf users_database.tgz /var/lib/mysql/vmail

All there is to do when you need to restore it is to stop Mysqld , extract the archive, restart .

I hope it helps you...

9

Re: iRedMail Backup in a Production Server

/usr/tmp/mybackup_dir> # tar pczvRf users_database.tgz /var/lib/mysql/vmail

...on a running sql-server?
This is not backup, this is a self-head-shoot!

mbsouth

10

Re: iRedMail Backup in a Production Server

@mbsouth

well, may it be, but I don't know rsync/rdiff or any other successful backup with live running server, so I did it the way I know and it has saved me once (RAID failed 2 HDDs and data was gone, so the backup saved me all users and pw's and domains with their mailbox settings).

I'm still waiting for a better solution on live running systems...
I would appreciate it very much.

TY