0

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Ack you're right... I just overwrote the database I needed. Ugh!
always worth double checking and then triple checking the warning messages it gives you when you issue a destructive command like this. We've all done it (once).

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.