ruby on rails - Heroku: download and restore database -


my heroku rails app has following database settings production

default: &default   adapter: sqlite3   pool: 5   timeout: 5000  production:   <<: *default   database: db/production.sqlite3 

as can see there no password in database. downloaded database commands

heroku pg:backups:capture     heroku pg:backups:download 

now want restore database, command should run restore database?

this worked me

pg_restore -d myapp_development -u rails_dev -c latest.dump 

here, local development database myapp_development, local database username rails_dev , latest.dump backup database file downloaded server. command above ask password should password associated user rails_dev.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -