I am a newbie to Postgresql and limited knowledge about MySQL. I am actually an Linux Admin.
I am working on a project to migrate data from mysql to postgresql for Gitlab. I did hte Gitlab install via Omnibus which went smoothly. My problem is that I cannot seem to get the data migrated into the Postgresql database. This is what I did:
I dumped the mysql data as follows using the appropriate name:
1. mysqldump --compatible=postgresql --default-character-set=utf8 \ -r databasename.mysql -u root databasename
Then I ran this python script to convert it to postgres that I found on the internet
python db_converter.py postgresdump-2016-06-14_15-34-52.sql postgresdump-2016-06-14_15-34-52.psql Line 750 (of 750: 100.00%) [21 tables] [9 inserts] [ETA: 0 min 0 sec]
As you can see it seems to have worked.
Then I tried to restore the data to the postgresql server and it does not seem to be working:
postgres-# psql -h localhost -d gitlabhq_production -U gitlab -f postgresdump-2016-06-14_15-34-52.psql
Note I manually created the gitlabhq_production database myself. . When I look at the databases it just doesn't seem right. The db in mysql is about 30mb.
Any ideas on why it will not work. Thank you.
gitlabhq_production=# \l+
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges | Size | Tablespace | Description
---------------------+----------+----------+-------------+-------------+-----------------------+---------+------------+--------------------------------------------
gitlabhq_production | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | 6493 kB | pg_default |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | 6493 kB | pg_default | default administrative connection database
template0