Skip to content

Instantly share code, notes, and snippets.

@mlsmith
Created October 10, 2016 18:35
Show Gist options
  • Save mlsmith/e1a4e70df69c04f12e72ab075c0a1deb to your computer and use it in GitHub Desktop.
Save mlsmith/e1a4e70df69c04f12e72ab075c0a1deb to your computer and use it in GitHub Desktop.
Create a dump of a remote postgres database
pg_dump -h remote_address -Fc -o -U db_username remote_db_name > file.dump
-h = host
-Fc = custom format archive
-U = DB username
-o = dump object identifiers (foreign keys)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment