Created
December 24, 2013 02:21
-
-
Save NathanielWroblewski/8107936 to your computer and use it in GitHub Desktop.
Copy a production database locally
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
| #!/bin/bash | |
| #import the latest dump from production | |
| heroku pgbackups:capture --expire --app <YOUR APP NAME HERE> | |
| curl -o latest.dump `heroku pgbackups:url --app <YOUR APP NAME HERE>` | |
| pg_restore --verbose --clean --no-acl --no-owner -h <DATABASE HOST> -U <DATABSE USERNAME> -d <DATABASE NAME> latest.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment