Skip to content

Instantly share code, notes, and snippets.

@ram4git
Last active March 9, 2017 09:35
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 ram4git/b039bab5dda6969ea21db13037955435 to your computer and use it in GitHub Desktop.
Save ram4git/b039bab5dda6969ea21db13037955435 to your computer and use it in GitHub Desktop.
PSQL DUMP AND RESTORE
#DUMP
pg_dump <DB_NAME> -U <USER_NAME> | gzip > <FILE_NAME>.gz
#RESTORE
gunzip -c <FILE_NAME>.gz | psql <DB_NAME>
#REFERENCES
#
#https://www.postgresql.org/docs/9.1/static/backup-dump.html
#
#postgres/cashcow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment