Pull and Push heroku pg database


Pull and Push heroku pg database.

1- gem install pg

2- gem install heroku taps sequel
#login to local pg database
3- sudo su - postgres

4- heroku pg:pull HEROKU_POSTGRESQL_MAGENTA mylocaldb --app HerokuAppName

HEROKU_POSTGRESQL_MAGENTA=> to know HEROKU_POSTGRESQL_MAGENTA run the following command 'heroku pg:psql' or we can direct access the herku pg database by this command.

HEROKU_POSTGRESQL_MAGENTA=>
this would be in the following format 'hci-tool::COBALT'

mylocaldb=>
your databse name;

HerokuAppName=>Your heroku app url

PULL
example=> heroku pg:pull hci-tool::COBALT hci-tool-new --confirm git@heroku.com:hci-tool.git

PUSH
example=> heroku pg:pull  hci-tool-new hci-tool::COBALT --confirm git@heroku.com:hci-tool.git

Comments

Popular Posts

How to pass hash in Postman

nginx: unrecognized service

Bootstrap Select Picker append add new item if search not exist

Reading Excel Sheets using "Roo" gem in ruby on rails

Add CORS to Nginx on AWS Elastic Beanstalk

Enable gzip compression on Elastic Beanstalk with nginx

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

Get video duration by URL in Ruby on Rails

site-enables nginx setting in ruby in rails