Content
migrate db from mysql to postgresql
Added by Gustav Gans over 5 years ago
Hello,
i have setup a test-vm with openproject and a mysql database. everything works, i can access openproject. now i try to migrate to postgresql with the official guide:
https://www.openproject.org/operations/upgrading/migrating-packaged-openproject-database-postgresql/
I have done everything from this guide, but now I get an error if I migrate:
root@openproject /up/ # pgloader --verbose $MYSQL_DATABASE_URL $POSTGRES_DATABASE_URL
2019-04-11T12:28:11.015000Z NOTICE Starting pgloader, log system is ready.
2019-04-11T12:28:11.027000Z LOG Main logs in '/tmp/pgloader/pgloader.log'
2019-04-11T12:28:11.032000Z LOG Data errors in '/tmp/pgloader/'
2019-04-11T12:28:11.032000Z ERROR Can not find file: "postgresql://openproject:XXXXXXXXX@localhost:5432/openproject"
2019-04-11T12:28:11.032000Z FATAL An unhandled error condition has been signalled:
No such file or directory: "postgresql://openproject:XXXXXXXXX@localhost/openproject"
root@openproject /up/ #
The URL's:
root@openproject /up/ # env|grep URL
POSTGRES_DATABASE_URL=postgresql://openproject:XXXXXXXXX@localhost/openproject
MYSQL_DATABSAE_URL=mysql://openproject:XXXXXXXXX@127.0.0.1:3306/openproject
root@openproject /up/ #
The user and the db exists:
postgres=# \l
Liste der Datenbanken
Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | Zugriffsprivilegien
-------------+-------------+-----------+--------------+-------------+-----------------------------
openproject | openproject | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | =Tc/openproject +
| | | | | openproject=CTc/openproject
postgres | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 |
template0 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 Zeilen)
postgres=# \du
Liste der Rollen
Rollenname | Attribute | Mitglied von
-------------+-----------------------------------------------------------------+--------------
openproject | | {}
postgres | Superuser, Rolle erzeugen, DB erzeugen, Replikation, Bypass RLS | {}
postgres=#
Its a fresh Debian 9 installation. Any ideas?