1 (edited by hata_ph 2010-02-24 15:34:51)

Topic: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

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 (for using roundcubemail as webmail only).
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
9. Restore /etc/httpd/conf.d/awstats.conf for access of the awstats report.

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.

----

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

2

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

please clear about the restore process

3

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

just use cp or mc to restore the backup file

4

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

I have run those two backup scripts and got it but pls clear the steps after that so can i successfully restore the file where they was.I mean the directories where i have to restore the files.pls help me.

5

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

For the database file...you can use phpmyadmin to restore the database........for other config file, just copy and paste back to the appropriate location...
I would recommend you to do a backup and restore testing on a test server......I use virtualbox to test it.....it will give you a good insight and more understanding about iRedMail....

6

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

thanks a lot.I am also tesing it on vmware.Its ur kindness if you provide me a good concept about iredmail.waiting for your feedback.

7

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

Which part that you do not understand?

8

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

hata_ph wrote:

Which part that you do not understand?

I am taking backup using scripts and while i am trying to restore i am facing the problems like taking long time to send mails and mails are found in inbox if i am keeping the mails manually on user mailbox on /var/vmail/......./maildir/...if i am taking the backup of /var/vmail/ and while restoring if i replace the whole /var/vmail directory mails are found on mailbox of users but not on webmail inbox.whats the problem?i need to solve it asap.if u can u just say which directories i have to take backup for saving mail and user mail account if crashes...

9

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

hata_ph wrote:

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 (for using roundcubemail as webmail only).
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
9. Restore /etc/httpd/conf.d/awstats.conf for access of the awstats report.

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.

Pls read my guide carefully.....I have listed all the files or directories that needed to be backup. When you restore the vmail directory to the new server it will only restore the email of your last backup. All the email is store in /var/vmail/*.

I am taking backup using scripts and while i am trying to restore i am facing the problems like taking long time to send mails and mails are found in inbox if i am keeping the mails manually on user mailbox on /var/vmail/......./maildir/...if i am taking the backup of /var/vmail/ and while restoring if i replace the whole /var/vmail directory mails are found on mailbox of users but not on webmail inbox.whats the problem?i need to solve it asap.if u can u just say which directories i have to take backup for saving mail and user mail account if crashes...

What I recommend is setup a new iRedMail server and make sure the configuration is exactly same as your original server. Test the server before restoring the old data. Then restore the old data using cp or mc. Are using the backup script provided by iRedMail? You can modify the script for which files or directories to backup. Always, disable the mail service while restoring the data just in case any missing new email when restoring.

10

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

hata_ph wrote:
hata_ph wrote:

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 (for using roundcubemail as webmail only).
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
9. Restore /etc/httpd/conf.d/awstats.conf for access of the awstats report.

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.

Pls read my guide carefully.....I have listed all the files or directories that needed to be backup. When you restore the vmail directory to the new server it will only restore the email of your last backup. All the email is store in /var/vmail/*.

I am taking backup using scripts and while i am trying to restore i am facing the problems like taking long time to send mails and mails are found in inbox if i am keeping the mails manually on user mailbox on /var/vmail/......./maildir/...if i am taking the backup of /var/vmail/ and while restoring if i replace the whole /var/vmail directory mails are found on mailbox of users but not on webmail inbox.whats the problem?i need to solve it asap.if u can u just say which directories i have to take backup for saving mail and user mail account if crashes...

What I recommend is setup a new iRedMail server and make sure the configuration is exactly same as your original server. Test the server before restoring the old data. Then restore the old data using cp or mc. Are using the backup script provided by iRedMail? You can modify the script for which files or directories to backup. Always, disable the mail service while restoring the data just in case any missing new email when restoring.

Thx bro.Its working.Thx for helping all the way.I got an error during running scripts because in scripts there is written database name polycid instead of postfixpolicyd.

11

Re: [FAQ] Backup/Restore procedure for iRedMail (using MySQL database)

Actually I have a few questions in regards to this.

hata_ph wrote:

2. Restore the 4 database for MySQL. I am using the /root/iRedMail/tools/backup_MySQL.sh to do the backup.

What 4 databases?  Looking in both the backup script directory and phpmyadmin there are a total of 6 databases (and 6 separate backups.)  I'm not quite certain what is essential - and restoring what may or may not cause conflicts.

Are there any issues if I create a complete mysql dump and restore that? ie All Databases?