简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM