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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -