Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django migrate from MySQL to Postgres

I recently decided that I want to switch from MySQL to Postgres because of a few problems I have been having which should never be a problem on Postgres.

However I cannot seem to find a nice way to migrate I have taken a look at py-mysql2pgsql however this caused issues within the database which I cannot track down.

I also looked into dumpdata and loaddata using django-admin.py however my database is rather large and it consumed all my memory and simply crashed so I then moved onto django-dumpdata-chunks which just errors out but then again the projec is two years old.

What I am asking is does anyone here know of a good reliable way to migrate from mysql to postgres without breaking the database and as a bonus if possible without downtime?

like image 964
Sam Buckingham Avatar asked Oct 18 '22 19:10

Sam Buckingham


1 Answers

Check out pgloader. It should make your life a lot easier.

like image 89
Julian Avatar answered Nov 15 '22 06:11

Julian