Created
February 14, 2018 06:01
-
-
Save harshalbhakta/6ecee17b50cbc0f079ec29d01fad71ef to your computer and use it in GitHub Desktop.
Postgresql Manual Backup & Restore
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
| On Server | |
| $ pg_dump -U dbadmin -d dbprd > ~/temp/db-backups/db-backup-14-feb-2018.pgsql | |
| On Dev Machine | |
| $ scp deployer@example.com:/home/deployer/temp/db-backups/db-backup-14-feb-2018.pgsql ./db-backup-14-feb-2018.pgsql | |
| $ psql -U dbadmin -d development_database < db-backup-14-feb-2018.pgsql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment