Skip to content

Instantly share code, notes, and snippets.

@andrewschoen
Created July 19, 2012 14:29
Show Gist options
  • Save andrewschoen/3144320 to your computer and use it in GitHub Desktop.
Save andrewschoen/3144320 to your computer and use it in GitHub Desktop.
Postgres Backup & Restore
Backup: $ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}
Restore: $ psql -U {user-name} -d {desintation_db} -f {dumpfilename.sql}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment