Skip to content

Instantly share code, notes, and snippets.

View vip3r011's full-sized avatar
🏠
Working from home

vip3r011

🏠
Working from home
  • ZA
View GitHub Profile
@vip3r011
vip3r011 / gist:e72c6cffbc222bfb61775b653b1d5690
Created March 24, 2018 12:13 — forked from jdeoliveira/gist:4080656
Dump/restore a postgres database in binary format for distribution
/Library/PostgreSQL/9.1/bin/pg_dump --host localhost --port 5432 --username <USERNAME> -b -c -E UTF-8 --no-owner --no-privileges --no-tablespaces --clean --schema public -F c -Z 9 -f <BACKUPFILENAME> <DATABASENAME>
/Library/PostgreSQL/9.1/bin/pg_restore --host localhost --port 5432 --username <USERNAME> --dbname <DATABASENAME> --no-owner --no-privileges --no-tablespaces --clean --schema public "<BACKUPFILENAME>"