Linked List

A personal knowledge base

PostgreSQL

#Connect to DB That Requires SSL

psql -h hostaname -U user "dbname=something_production sslmode=require"

#Dump and Restore All Databases

# dump
pg_dumpall -c > dump.sql

# restore
psql -f dump.sql postgres

-c tells pg_dumpall to include statements to drop existing databases before loading and recreating them.

Last modified: 31 Mar 2016