Need to export NC's MySQL to another server, then import it as PostgreSQL into new NC

About to move from Nextcloud on TrueNAS Core to Nextcloud on Scale.

The two Nextcloud instances seem to use different databases.

The core Nextcloud is using MySQL, and the Scale version is using PostgreSQL. I have read a lot and can see mostly how to move the files over, but the information about switching the database is mainly about changing the database that is used in-situ. I do NOT want to change the database that the old (core) NC is using, i just want to export it over to be used on the newer server (scale).

I need to export the mysql from core, move that exported file to the new server and then convert it to PostgreSQL, then import it to NC.

Yeah that’s a little weird. I’m not sure why the TrueNAS Scale chart locks a deployment into only using one of Nextcloud’s supported database types.

Normally you’d either do the conversion at the source or just export the source database as-is over to your target environment. Then do the conversion there.

The Scale Chart only supporting postgresql makes your use case tougher.

I’d probably create an intermediate installation that is solely for migration purposes (that doesn’t use the Scale chart thus not suffering from that constraint).

That said, unfortunately you have another (unrelated) hurdle that is due to unfortunate timing: officially the occ db:convert-type command was disabled a little while back to prevent a data loss scenario introduced by some other behind-the-scenes database connection changes in Server. There are, however, some workarounds in the mean time. See nextcloud/server#45257.

1 Like

Yea that makes sense, I suppose if I was really feeling lucky with my main system I could switch to PostgreSQL there and then port it over to the new system and then either leave my old core system with PostgreSQL OR try and switch it back again, although I’m not even sure I can do that at all.

An intermediate would be the best idea (if i had one) , na im sure i can did something out of the loft.

O yea OFC it was /s, lol.

I shall take a look,

Thx for the link and heads up.