Topic: Migrating server1->server2, both have same iredmail
==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? N
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello everyone,
Basically, I am in the process of migrating from server1 to server2. I would like to completely transfer all the data (emails, accounts, mysql dbs, domain) from one server to another one. At the moment everything is working fine on server1 and I have already set up the same 0.9.7 iredmail on server2. Also, I have imported a vmail mysql backup file onto server2, I can login into iredmail control panel and I see all my account there.
Obviously, I cannot use the domain since it is serving server1 at the moment.
What would be the best and pain-free way to copy everything from server 1 and make it work on server2?
My understanding is:
- since both servers are running the same iredmail versions, I can rsync all mysql backups from /var/vmail/backup and then restore all of them on server2 with mysql -u root -p -h localhost [appropriate_user_name] < [backup.filename].sql
Since all the credentials are the same, there should be no issues importing mysql backup file on server2
- DKIM: simply rsync /var/lib/dkim server1->server2
- Mailboxes: rsync /var/vmail server1->server2
- Roundcube: rsync mysql backup from /var/mail/backup server1->server2 and restore on server2 as above
- Amavisd, iredAPD, iRedAdmin: same as roundcube
At the end I will force dovecot to recalculate mailbox quota
Once everything is in place, I will change my DNS records to match a new server.
Is everything correct or did I miss anything?
Thanks
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.