jenno
jenno

Reputation: 71

Postgres dev db not uploading to Heroku with pg:transfer

I'm trying to clone my development postgres db to Heroku with the command:

heroku pg:transfer -t postgres://localhost/MentorConnect_development -f postgres://mbarwrandompn:DaVXj1_AVytIgLU3lsyEKjU8eC@ec2-23-21-129-229.compute-1.amazonaws.com:5432/d4ahirandom

(changed the url for privacy)

It seems to work -- I get a lot of lines going with my database columns and everything with no errors. However when I go into the Heroku rails console, the database is empty. What am I doing wrong?

Upvotes: 0

Views: 204

Answers (1)

John Beynon
John Beynon

Reputation: 37507

Your command there is transferring from Heroku to localhost, not development > heroku as per your question.

Also, it's much easier to use the colour of the database rather than the full URL (get it from heroku config output) eg;

heroku pg:transfer -f postgres://localhost/mydb -t COLOUR

where COLOUR is from the HEROKU_POSTGRESQL_COLOUR_URL from the heroku config output.

Upvotes: 1

Related Questions