igorgue
igorgue

Reputation: 18252

How to migrate PostgreSQL data to Heroku

I'm moving from EC2 to Heroku, and I got a shared database so I cannot use psql to restore the database.

Any ideas or strategies to move this?

The only option I can think of right now would be to dump the data in Django (they use JSON for that) and migrate.

I have a Django app and a 20GB shared PostgreSQL database.

Upvotes: 2

Views: 1276

Answers (2)

John Beynon
John Beynon

Reputation: 37507

First up, I'll just state I'm a Ruby guy not Python so can't talk authoritatively for Python but may be able to point you in the right direction.

To get data into Heroku shared DBs you have two options,

  1. heroku db:push - May be Ruby only but allows you to push contents of local db (whatever it is) into your shared database on Heroku.

  2. heroku pgbackups:restore - allows you to restore a dump of a PostGres database into your heroku db.

If you're already using mySQL then you could look at ClearDB addon as a solution - this permits direct access via mySQL tools.

Upvotes: 0

Related Questions