1

Topic: Migrate from MySQL to MariaDB or Postgres?

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

The recent problems with MySQL and FreeBSD 12 have me thinking it may finally be time to move away from MySQL. Two questions:

1. In a previous thread you said migrating to MariaDB was simply a matter of dumping the databases, uninstalling MySQL, installing MariaDB, and then restoring the DBs. Is that still true?

2. What about PostgreSQL? Is the migration the same, or does it require some different procedure?

Many thanks!

----

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

2

Re: Migrate from MySQL to MariaDB or Postgres?

cvcvelo wrote:

1. In a previous thread you said migrating to MariaDB was simply a matter of dumping the databases, uninstalling MySQL, installing MariaDB, and then restoring the DBs. Is that still true?

Yes.

And help us push SOGo team to fix it:
https://sogo.nu/bugs/view.php?id=4684

cvcvelo wrote:

2. What about PostgreSQL? Is the migration the same, or does it require some different procedure?

If you export mail accounts with "mysqldump", you can not import it to PostgreSQL directly, you need to do some "convert".

3

Re: Migrate from MySQL to MariaDB or Postgres?

Thanks, zhb. I've added a complaint at the SOGo URL you provided.

The PostgreSQL wiki offers several scripts for generic MySQL-to-PostgreSQL migration, and I'm planning on trying these on a test machine.

But what configurations specific to iRedMail and iRedAdmin-Pro need to change? For example, Postfix's main.cf file calls a bunch of alias maps, each of which contains SQL queries. Does that stuff differ in PostgreSQL? Or anything else?

Thanks again.

4

Re: Migrate from MySQL to MariaDB or Postgres?

cvcvelo wrote:

But what configurations specific to iRedMail and iRedAdmin-Pro need to change? For example, Postfix's main.cf file calls a bunch of alias maps, each of which contains SQL queries. Does that stuff differ in PostgreSQL? Or anything else?

Almost same. but if you setup a new iRedMail server, iRedMail already generates them for you, you don't need to take care of them.