# Migrate Database From MariaDB to PostgreSQL

**URL:** <https://forum.mattermost.com/t/migrate-database-from-mariadb-to-postgresql/23529>\
**Category:** Uncategorized\
**Created:** [July 8, 2025, 10:00am UTC](https://forum.mattermost.com/t/migrate-database-from-mariadb-to-postgresql/23529 "2025-07-08T10:00:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arezoo](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@Arezoo](https://forum.mattermost.com/u/Arezoo)\
**Post date:** [July 8, 2025, 10:00am UTC](https://forum.mattermost.com/t/migrate-database-from-mariadb-to-postgresql/23529/1 "2025-07-08T10:00:53Z")

</div>

Hello,  
I am using Mattermost 10.1.2, and since then, because I am using MariaDB, I haven’t been able to update the server. This is because in newer versions, due to database incompatibility, I faced issues with notification delivery.  
For a while now, I’ve been receiving a notification on the mobile app stating that the server version needs to be updated and that some services, like notification delivery, might be affected.  
Now, in order to update to the latest version, I need to migrate the database from MariaDB to PostgreSQL first.  
The official Mattermost documentation is a bit complex for me.  
Is there anyone here who has done this before and can guide me through the process?

---

<div class="post-metadata">

**Author:** ![rtfm98](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@rtfm98](https://forum.mattermost.com/u/rtfm98)\
**Post date:** [July 8, 2025, 9:21pm UTC](https://forum.mattermost.com/t/migrate-database-from-mariadb-to-postgresql/23529/2 "2025-07-08T21:21:23Z")

</div>

As far as I know, MariaDB isn’t supported at all (maybe it was years ago, but in the last few years it wasn’t). I’d recommend to migrate to MySQL first, before migrate to PostgreSQL (e.g. because the migration script supports MySQL only).

For MariaDB → MySQL: [https://blogs.oracle.com/mysql/post/how-to-migrate-from-mariadb-to-mysql-80](https://blogs.oracle.com/mysql/post/how-to-migrate-from-mariadb-to-mysql-80)

For MySQL → PostgreSQL: [Automated PostgreSQL migration - Mattermost documentation](https://docs.mattermost.com/deploy/postgres-migration-assist-tool.html)

For now, I don’t have much real-life experience with these types of migration, though.

> [@Arezoo](#):
>
> The official Mattermost documentation is a bit complex for me

What are the points in the docs that are too complex?

---

<div class="post-metadata">

**Author:** ![awky](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@awky](https://forum.mattermost.com/u/awky)\
**Post date:** [July 9, 2025, 4:34pm UTC](https://forum.mattermost.com/t/migrate-database-from-mariadb-to-postgresql/23529/3 "2025-07-09T16:34:03Z")

</div>

You might consider creating a new Mattermost instance and following this excellent guide to migrate your data over (using mmctl):

> [@Recipe: Migrating a Mattermost Server with \`mmctl\`](https://forum.mattermost.com/t/recipe-migrating-a-mattermost-server-with-mmctl/11912):
>
> Problem You want to move your Mattermost data from one Mattermost server to another, including files, but can’t back up your database and files directly. Solution Note: These instructions are for Mattermost v5.36.1 and higher. Please upgrade your Mattermost instance if you are running an older version. 0. Set up your destination server Install Mattermost and create a single Mattermost user as admin. Go to the System Console and configure it as necessary for your application. [Instructions for i…](https://docs.mattermost.com/install/requirements.html)

Full disclosure, I’m about to self bump my own bug report 😀

Hopefully you have better luck than me, as I’m facing a bug with mmctl export:

> [@Mmctl export create fails with 'Limit exceeded for paging'](https://forum.mattermost.com/t/mmctl-export-create-fails-with-limit-exceeded-for-paging/23485):
>
> Summary While trying to create an export, mmctl export create fails with: exportAllPosts: Limit exceeded for paging., failed to find Posts Steps to reproduce On the Mattermost server, create an export:cd /opt/mattermost/ bin/mmctl --local export create Check the logs:tail -f /opt/mattermost/logs/mattermost.log Mattermost version 10.7.0 Expected behaviour Create a full export of the server, including messages. Observed behaviour No user messages are in the resulting export. The file…
