Skip to content

Instantly share code, notes, and snippets.

@bianchimro
Created October 26, 2016 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bianchimro/bbaf994ac5c059f666d49dab40ce6793 to your computer and use it in GitHub Desktop.
Save bianchimro/bbaf994ac5c059f666d49dab40ce6793 to your computer and use it in GitHub Desktop.
Postgresql dump and restore (plain sql)
pg_dump --format=plain --clean --host=$HOST --username=$USER $DB > $OUT_PATH.sql
psql -U $USER -d $DB -f $OUT_PATH.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment