Skip to content

Instantly share code, notes, and snippets.

@franciscomxs
Created January 25, 2016 14:32
Show Gist options
  • Save franciscomxs/9513952daad00bce2887 to your computer and use it in GitHub Desktop.
Save franciscomxs/9513952daad00bce2887 to your computer and use it in GitHub Desktop.
pg_dump -U <username> -W -Fc <databasename> > <filename>.dump
scp -i ~/.ssh/cx_<id>_pkey <user>@<ip>:<filename>.dump <filename>.dump
pg_restore -c -U postgres -d <databasename> <filename>.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment