Last active
November 18, 2015 12:58
-
-
Save lenart/fb31fcd2521d6f72760c to your computer and use it in GitHub Desktop.
Get production database from heroku and update it 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
# Using [parity](https://github.com/thoughtbot/parity) | |
development restore production | |
development restore staging | |
# Steps for manual backup | |
heroku pg:backups capture --remote production | |
curl `heroku pg:backups public-url --remote production` > tmp/db.dump | |
psql [db_name] | |
drop schema public cascade; | |
create schema public; | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d [db_name] tmp/db.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment