Manually Migrate MySQL to Postgres

I have the remnants of a Nextcloud snap server that I’m trying to move to my Kubernetes server.

I’ve copied the data directory over, and I’ve loaded the MySQL database on another machine. Now, I want to move the MySQL database to a postgres db to be better supported by the official Nextcloud helm chart (and because all the other databases I’m managing are postgres, so it’ll make management overall easier).

Without starting the Nextcloud snap again (I don’t want to deal with synchronization issues between the files and the db, and I just finished copying over a few hundred gb), can I just export the MySQL database using a tool like ora2pg, or do I need to start the server temporary to use the occ command?

Also, is there anything else I might need to be concerned about when doing this migration (like how changing the data directory might cause a problems)?

Thank you so much!

To backup the database, you do not need the occ command, you can just use the system tools, e.g. for the restore of a db:

If you have the SQL backup from MySQL, I don’t know if you can just restore that in your postgres.

If you change the data folder at the same time, unfortunately, it is not enough to change the location just in the config.php, it requires a bit more:

This topic was automatically closed after 90 days. New replies are no longer allowed.