2

Say that I want to migrate a PostgreSQL database on Heroku to MySQL on EC2 and I need to preserve the ID values in all the tables, what's the best way to accomplish that without using paid software?

1 Answer 1

2

It's quite simple.

I would have mySQL instance locally, heroku db:pull to get it from Heroku Postgres to your local development mySQL instance, back it up and then restore the backup to your EC2 MySQL instance

2
  • I'm guessing heroku db:pull preserve the ID values even if they are pulled into a different type of database? If so, then this is a winner. Commented Apr 6, 2011 at 5:02
  • yep, it uses TAPS behind the scene, works very well - just watch out sometimes if you've done some DB specific sql that it may break going over to another DB platform. Commented Apr 6, 2011 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.