Last active
August 29, 2015 13:56
-
-
Save chrisdpeters/9080178 to your computer and use it in GitHub Desktop.
PostgreSQL Backup and Restore Commands
This file contains hidden or 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 [host address] -p [port] -U [username] [database name] -F t -f [file path] |
This file contains hidden or 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_restore --verbose --clean --no-acl --no-owner -h [host address] -p [port] -U [username] -d [name] [file path] |
This file contains hidden or 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
$ heroku pgbackups:capture -a [APP_NAME] | |
$ heroku pgbackups:url -a [APP_NAME] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment