Last active
August 29, 2015 14:18
-
-
Save jufemaiz/98e6dac1b1e4377fe6cf to your computer and use it in GitHub Desktop.
Backup / Recover PostgreSQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pg_dump -h {hostname} -U {user-name} -W -v {source_db} -f {postgresql-backup-`date +"%Y%m%d%H%M%S%z"`.sql} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psql -U {username} -W -d {database_name} -f {filename} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment