1

Topic: Transfer to new server, best way to do it?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version: 0.9.3
- Deployed with iRedMail Easy or the downloadable installer? Can't remember
- Linux/BSD distribution name and version: CentOS 7.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
====

I have a functioning iRedMail server but it is older (0.9.3). It was installed several years ago with some questionable LAMP repos (city-fan.org, etc). After learning some lessons I want to build a new server and migrate everything from old to new. Specifically I want a stable and proper LAMP environment (no oddball repos) and to switch from Apache to Nginx.

Is it possible to install a new machine (Virtual) with CentOS 7.6, Nginx, MariaDB and load iRedMail 0.9.9 like a fresh install and then somehow migrate the old server's accounts and settings to the new server? I assume I'd have to perform some database maintenance as I believe some of the upgrade steps from 0.9.3 to 0.9.9 require some table modifications, etc. The new server would be the same hostname.domainname and IP as the old server.

Bottom line, instead of performing surgery on the current server I'd like to fresh load it, ditch Apache for Nginx and somehow get all of my mailboxes, mail, SOGo, passwords, etc over to the new server.

----

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

2

Re: Transfer to new server, best way to do it?

echo5 wrote:

Is it possible to install a new machine (Virtual) with CentOS 7.6, Nginx, MariaDB and load iRedMail 0.9.9 like a fresh install

Just use a fresh/clean OS without Nginx/MariaDB installed please. iRedMail will install them automatically.

Suggested path:

1) Export "vmail" database on old server.
2) Setup new iRedMail server on a fresh/clean OS.
3) On new server, Import the "vmail" database you exported on step #1 to a new database, e.g. "oldvmail". Note: do not import to "vmail" database which was created by iRedMail installer.
4) On new server, update "oldvmail" database by following iRedMail upgrade tutorials, apply all SQL database relevant changes to the "oldvmail". From 0.9.3 to 0.9.4, then 0.9.4 to 0.9.5, then ..., then 0.9.8 to 0.9.9.
5) On new server, export "oldvmail" and import it to "vmail".
6) Copy mailboxes from old server to new server with "rsync + ssh". Note: copy them to same directory (on new server) as old server.

3

Re: Transfer to new server, best way to do it?

Could you please give some more details on how to export and import databases?
Can this be done from within iRedMail? Or does one have to use MariaDB directly?

4

Re: Transfer to new server, best way to do it?

It seems as if it has to be done from the MySQL shell - but how can I log in there?
Some kind of step-by-step description would be greatly appreciated. Thanks in advance!