Move from postgres to mariadb


at the moment I have a nextcloud running on truenas scale. There is the database a postgres db. Now I will move to Synology, there is the database a mariadb.
Is it possible to change the postgres to a mariadb?

Yes this is possible there are various possibilities

sql - Importing records from PostgreSQL to MySQL - Stack Overflow dated 2012

Migrating to MariaDB from PostgreSQL - MariaDB Knowledge Base

How to restore Postgresql dump file in MariaDB database - Stack Overflow

after reading a few of these post it not a easy task though not too hard with adequate knowledge. There is not a oneliner that will help you here.

Best of luck in your endeavor

Hi @daschmidt94. While @Vincent_Stans has the right idea in general for database conversions, fortunately Nextcloud already has a built in tool for handling this. It’s an occ command: occ db:convert-type.

Despite what’s implied in the docs, it’s used routinely for MySQL/MariaDV->PostgreSQL (and the other way around) conversions - not simply for migrating from SQLite.


you don’t want to run postgresql as a container on your synology?

1 Like

Had postgres only running becaus truenas scale with the app from truecharts had postgres.

The most tutorials are with mariadb and the recommended db is also mariadb.

Maybe I give it a try with a postgres container