Skip to content

Instantly share code, notes, and snippets.

@attilagyorffy
Created August 9, 2017 16:06
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 attilagyorffy/34289b346c78ee5ddd20e066efcd6376 to your computer and use it in GitHub Desktop.
Save attilagyorffy/34289b346c78ee5ddd20e066efcd6376 to your computer and use it in GitHub Desktop.
Import a PostgreSQL production database locally via a pipe
ssh -C myproductionhost.com "sudo -u postgresuser PASSWORD="password" pg_dump production_database_name" | psql local_database_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment