Skip to main content

Create your own local DB backup/Restore from backup

Back up your current db: pg_dump -h localhost -d powr_development -f db_v08062019.dump pg_dump creates a snapshot of everything you have in your db (including all migrations ran until that point). You can save this file anywhere you want.

Restoring from the dump file you created:

  1. Drop local db
dropdb powr_development

  1. Recreate db createdb powr_development
  2. Reload from dump
psql -d powr_development -f db_v08062019.dump