Move from postgres to mariadb

Hello,

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

https://www.sqlpipe.com/

https://dev.mysql.com/blog-archive/how-to-migrate-postgresql-databases-to-mysql-using-the-mysql-workbench-migration-wizard/ 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.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/db_conversion.html

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#database-conversion

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?

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