1

Topic: daily backup for iredmail

==== Required information ====
- iRedMail version: v0.2.2 (MySQL)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  Mysql
- Linux/BSD distribution name and version: Linux Ubunut 12.04.2 lts
- Related log if you're reporting an issue:
====

Is there anyway to back up the whole mail server daily or not?

----

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

2

Re: daily backup for iredmail

Databases are backed up daily out of the box (are put into /home/backup on my system)... backup of the whole server is way out of the scope of iRedMail project.

You have a lot of options:
1) use some backup solution like bacula,
2) create a simple batch and run it daily from cron (tar, gzip, rsync, ssh are your friends)
3) if you run iRedMail in virtual environment, you can backup the whole virtual machine from your host easily.

etc.

3

Re: daily backup for iredmail

Databases are backed up under /var/vmail by default. Just check root user's cron job.

4

Re: daily backup for iredmail

I am just asking for the back up of the whole iredmail setup noting else on the server and how do I do the cron job to do this back up for /var/vmail?

5

Re: daily backup for iredmail

I do backup of the whole system (it's virtualized), but if it doesn't work for you and you want to backup just the configuration and data, you need to find the relevant files and create the backup script by yourself.

As startup, I do backup following configuration files:

1) /usr/share/apache2/roundcubemail/config/*.inc.php
2) /etc/amavis/conf.d/50-user
3) /etc/apache2/sites-*/
4) /etc/clamav/
5) /etc/cluebringer/
6) /etc/fail2ban/
7) /etc/postgresql/
8) /etc/postfix/
9) /etc/dovecot/

Note:
You need to adjust the 7) as you use mysql backend.
Don't forget to grab the dumps of databases as mentioned in previous posts.
Also it's good idea to backup also user mailboxes.

And the most important: you have to test the restore procedure to be sure, you have all important data backed up!

The procedure should be:
1) reinstall system,
2) install iRedMail (the same version as you have!!!)
3) overwrite all the configuration files
4) restore all the databases

6

Re: daily backup for iredmail

thanks camel1cz for that information.

7

Re: daily backup for iredmail

how I also back up mysql databases from mysql for iredmail I forgot to ask about that.

8

Re: daily backup for iredmail

It's done automatically / look in /var/vmail/backup/

9

Re: daily backup for iredmail

only thing I see is backup_mysql.sh noting else in there

10

Re: daily backup for iredmail

nwohiobb wrote:

only thing I see is backup_mysql.sh noting else in there

Does it work if you execute this script manually? For example:

# bash /var/vmail/backup/backup_mysql.sh

Check whether you have cron job to execute this script daily, it's added automatically during iRedMail installation:

# crontab -l -u root

About backup:

*) iRedMail adds cron job to backup mail accounts daily. Backup script and backed up SQL/LDIF files are placed under /var/vmail/backup by default.

*) iRedMail doesn't backup mailboxes. Mailboxes takes large disk space, it doesn't make sense to backup them on the same server which causes double disk I/O and (slightly) slow down the server. And of course we cannot know you have a mounted spare disk for backup. So we leave it to system admin.

*) You don't need to backup config files if you didn't modify it. You know you can get a same, working config file with a new iRedMail installation (with correct SQL/LDAP usernames/passwords). If you did some modification, of course you should write it down somewhere to help you reproduce the same config on a new iRedMail server. This is one of iRedMail benefits: you can always get a working server with (almost) same settings as your old one.

11

Re: daily backup for iredmail

I have not did anything yet but I am planning on backing information onto an external computer on the network if that could be done or not along with mysql with iredmail config files.

12

Re: daily backup for iredmail

Hi @nwohiobb,

Could you please help answer my question here: http://www.iredmail.org/forum/post25257.html#p25257
So that i can fix it.