Last active
August 29, 2015 14:01
-
-
Save lpf23/59d7d2f5bae1ec0e86fe to your computer and use it in GitHub Desktop.
Heroku DB 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
heroku pgbackups:capture DATABASE --app app1 --expire |
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
1) heroku maintenance:on --app app1 | |
2) heroku pg:reset DATABASE --app app1 --confirm app1 | |
3) heroku pgbackups:url --app app2 | |
3a) copy result with double quotes for use in next command | |
4) heroku pgbackups:restore DATABASE <string from previous command with double quotes> --app app1 --confirm app1 | |
5) heroku run:detached rake db:migrate --app app1 | |
6) heroku maintenance:off --app app1 | |
7) heroku restart --app app1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment