Skip to content

Instantly share code, notes, and snippets.

@IlkhamGaysin
Last active February 19, 2018 09:51
Show Gist options
  • Save IlkhamGaysin/d5bd2a220ff1c96c920d8fd38d95d4ce to your computer and use it in GitHub Desktop.
Save IlkhamGaysin/d5bd2a220ff1c96c920d8fd38d95d4ce to your computer and use it in GitHub Desktop.
Import and Export *.sql file to local database

Import

psql -U postgres -h 0.0.0.0 -p 5434 -W nywt_development  < ~/Documents/dumps/dump.sql

Export

psql -U postgres -h 0.0.0.0 -p 5434 -W nywt_development  > ~/Desktop/dumps/gzip dump.sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment