1

Topic: Migration and after post

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.8
- Deployed with iRedMail Easy or the downloadable installer? Downloadable Installer / Manual
- Linux/BSD distribution name and version: uBuntu 22.04.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL/MariaDB
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I want to try out the migration. I want to learn it.
So, I have first server already installed and running.
It serves several domain, said: red.com, blue.com and green.com.
The main email is red.com when installer requested it.
The second server, which target as migration server, installed with domain yellow.com

I read this doc: docs.iredmail.org/migrate.to.new.iredmail.server.html

When the second server done, I try to perform the migration.
I backed up databases: amavisd, fail2ban, iredadmin, iredapd, roundcubemail and vmail.
I restore all those sql into the server.
Then I backup /var/vmail but later I only restore the exact folder /var/vmail/vmail1 into the server.
I skip the others folder in /var/vmail/ thinking it will replace the current settings.
Since the maildir I assume in that specific folder called vmail1 in /var/vmail/

When all done, I try to login into the second server.
However, seems the original setup which has postmaster (at) yellow.com as the main account has been gone, I assume the database restore completely remove the setup. So, the main account has been change to the old one which is postmaster (at) red.com

All seems back as the old one, at the first server. All account still exist and all emails valid.
However the current postmaster (at) yellow.com has gone with all those emails within.
I have to setup new domain again and create that specific user one more time.

My questions:

1. Is it possible to keep the original setup at the second server which has postmaster (at) yellow.com as primary account and the global admin in the iredAdmin/APD setting?

2. Since the new one has new default email as the root/postmaster which is postmaster (at) yellow.com HOW to change that so it will same with the first server which is postmaster (at) red.com so I can continue using the old account to receive the daily email like cron result, logwatch report, etc..

----

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

2

Re: Migration and after post

Oen Sing wrote:

1. Is it possible to keep the original setup at the second server which has postmaster (at) yellow.com as primary account and the global admin in the iredAdmin/APD setting?

In this case, do not restore "vmail" tables directly with command like "mysql vmail < vmail-backup.sql", it will re-create SQL tables, hence you loses old sql data.

Try to prepare "vmail" database for restore with mysqldump extra arguments, e.g. "--no-create-info", "--skip-triggers". Note: they dump data without re-creating tables, but it may require you have same table columns IN ORDER.

Oen Sing wrote:

2. Since the new one has new default email as the root/postmaster which is postmaster (at) yellow.com HOW to change that so it will same with the first server which is postmaster (at) red.com so I can continue using the old account to receive the daily email like cron result, logwatch report, etc..

Update alias address of "root" user in /etc/postfix/aliases file. Run "postalias /etc/postfix/aliases" after modified the file.

3

Re: Migration and after post

Thanks.... However another issue up with:
database /etc/postfix/aliases.db is older than source file /etc/postfix/aliases

I assume I need to run newaliases after that changes?