Postgres Setup
From ElixirBlocks
Windows
Download and install postgres from: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
When complete , launch the SQL Shell (psql) prompt application.
Press Enter for each item in the list except "password". For password the default password is password. Type the password and hit Enter.
Useful Commands
Drop the existing database
dropdb -h localhost -p 5432 -U testbed_admin_name database_name
Create a fresh database
createdb -h localhost -p 5432 -U testbed_admin_name database_name
Now import the backup
psql -h localhost -p 5432 -U testbed_admin_name -d database_name < database_backup.sql
- h localhost - hostname
- p 5432 - port (default PostgreSQL port)
- U testbed_admin_name - username
- d database_name - database name