OurBigBook
First download a dump of the database as per devcenter.heroku.com/articles/heroku-postgres-import-export with web/bin/pg_dump_heroku:
web/bin/pg_dump_heroku
This produces a file latest.dump with the database dump. If that already exists, it gets overwritten.
Restoring can be done with the helper web/bin/pg_restore_heroku:
web/bin/pg_restore_heroku
That helper restore the local latest.dump database file like in Section "Save and restore local PostgreSQL development database". First we nuke the database completely with web/bin/pg-setup to increase accuracy:
web/bin/pg-setup
web/bin/pg_restore --no-acl --no-owner latest.dump
We also add some extra flags to reduce the ammount of warnings and errors due to database differences. The command does not exit with status 0. devcenter.heroku.com/articles/heroku-postgres-import-export says some of those warnings are normal and can be ignored.

Ancestors

  1. Heroku debugging
  2. Heroku deployment
  3. OurBigBook Web deployment
  4. OurBigBook Web development
  5. OurBigBook Web
  6. OurBigBook Project