Migrating Database from Heroku to AWS

I want to migrate our postgres db from heroku to our own postgres on AWS.

I tried using pg_dump and pg_restore to do the migration and it works; but this takes a very long time. Our database size is about 20 GB.

What's the best migration path with minimal downtime?

+3


source to share


1 answer


If you mean AWS RDS PostgreSQL:

pg_dump

and pg_restore

I know you don't like this, but you have no other options. With a lot of hoop jumping, you could do it with Londiste or Sloni-I on the next EC2, but that would be ... interesting. It's not the most convenient way to do the update, to say the least.

What you should do is send WAL to RDS PostgreSQL and / or thread replication logs. However, Amazon does not support this .



Hopefully Amazon adopts part 9.4 of the logical replication and logical change functionality, or better yet, the BDR project - but I wouldn't say I'm holding my breath.

If you mean AWS EC2

If you are running your own EC2 instance with Pg, use replication , then push fallback to the new master.

+3


source







All Articles