1

Topic: Good backup strategey for mailboxes

I have ran the script included int eh program to backup my configuration, but the script says I must do the MySQL dump and backup of /home/vmail myself. 

I have done that already using another bash script I wrote that does a mysql dump and puts it into a direct and tars that along with the /home/vmail directory.

In the even of a system crash what would be the best way to restore all the users mail?  I figured restore the configuration or even do a fresh install, put tine info back into MySQL from the dump file and restore /home/vmail.  WQould that be correct?  What procedures would you recommend for just restoring one users mailbox?

----

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

2

Re: Good backup strategey for mailboxes

You are right.

  • Setup a new iRedMail

  • Restore configurations

  • Restore mailboxes

  • Restore postfix queues under /var/spool/postfix/

  • Restore MySQL databases

What procedures would you recommend for just restoring one users mailbox?

One user's mailbox? Restore (e.g. via cp command) the backup mailbox.

3

Re: Good backup strategey for mailboxes

I know this is an old thread but I was testing to backup and restore for iRedMail. I did the backup using the backup_iRedMail.sh and backup_MySQL.sh. Then I setup another iRedMail on a different server, I restore the database and copy everything from /var/vmail to the new server. When I want to access my webmail interface, it should

DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.

All the MySQL user and password is the same...do anyone have any idea? Or do anyone have any good guide for backup and restoring iRedMail/iRedOS. Thanks.

4

Re: Good backup strategey for mailboxes

You should configure roundcube to use the mysql database which you restored.

5

Re: Good backup strategey for mailboxes

ZhangHuangbin wrote:

You should configure roundcube to use the mysql database which you restored.

How?

6

Re: Good backup strategey for mailboxes

On RHEL/CentOS, configure /var/www/roundcubemail/config/*.inc.php.
On Debian/Ubuntu, configure /usr/share/apache2/roundcubemail/config/*.inc.php.

7

Re: Good backup strategey for mailboxes

Do you mean i need to copy the *.inc.php from the config folder from the original server to the backup server?

8 (edited by hata_ph 2010-02-17 09:07:32)

Re: Good backup strategey for mailboxes

Ok. I think I have figure it out the backup procedure. Currently I am using iRedOS-0.5 (with mysql as the backend database) and I am testing to do a backup/restore procedure. Below is the step for it.

1. Setup a new iRedMail server with the same configuration as the old server.
2. Restore the 4 database for MySQL. I am using the /root/iRedMail/tools/backup_MySQL.sh to do the backup.
3. Restore /var/www/roundcubemail/config/*.inc.php.
4. Restore /var/vmail/* (your mail directory).
5. Restore /etc/policyd.conf and /etc/policyd_sender_throttle.conf.
6. Restore /etc/postfix/mysql*.cf.
7. Restore /etc/dovecot-mysql.conf.
8. Restore /var/www/roundcubemail/plugins/changepasswd/config.inc.php for the change password plugins

PS: I didn't restore configuration file like main.cf/master.cf for postfix and other as the iRedMail installation for both server is the same.

9

Re: Good backup strategey for mailboxes

That's why we need iRedMail similar project, it's easy to reproduce the same environment, and easy to backup/restore.

10

Re: Good backup strategey for mailboxes

ZhangHuangbin wrote:

That's why we need iRedMail similar project, it's easy to reproduce the same environment, and easy to backup/restore.

Thanks for a wonderful product. smile

11

Re: Good backup strategey for mailboxes

hata_ph wrote:

Ok. I think I have figure it out the backup procedure. Currently I am using iRedOS-0.5 (with mysql as the backend database) and I am testing to do a backup/restore procedure. Below is the step for it.

1. Setup a new iRedMail server with the same configuration as the old server.
2. Restore the 4 database for MySQL. I am using the /root/iRedMail/tools/backup_MySQL.sh to do the backup.
3. Restore /var/www/roundcubemail/config/*.inc.php.
4. Restore /var/vmail/* (your mail directory).
5. Restore /etc/policyd.conf and /etc/policyd_sender_throttle.conf.
6. Restore /etc/postfix/mysql*.cf.
7. Restore /etc/dovecot-mysql.conf.

PS: I didn't restore configuration file like main.cf/master.cf for postfix and other as the iRedMail installation for both server is the same.

What about Ldap backend? How do I backup and restore LDAP users? I hope you can automate the back up and restore procedure also, that will be great!

12

Re: Good backup strategey for mailboxes

afaquino wrote:

What about Ldap backend? How do I backup and restore LDAP users?

Use slapcat or ldapsearch to dump LDIF data.

13

Re: Good backup strategey for mailboxes

i got Available database(s) do not allow slapcat when i tried to use slapcat or the given script on iredmail 0.6.1 sad

14

Re: Good backup strategey for mailboxes

Please paste error message/log here, so that others can help troubleshoot.