Created
December 4, 2012 18:26
-
-
Save alexmcpherson/4207203 to your computer and use it in GitHub Desktop.
Upgrading a Heroku DB
This file contains 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
Migrating to another DB plan in Heroku | |
# Provision new DB plan | |
heroku addons:add heroku-postgresql:basic --remote production | |
heroku pg:wait --remote production | |
# Prevent New Updates | |
heroku maintenance:on --remote production | |
heroku ps:scale worker=0 --remote production | |
# Capture Backup | |
heroku pgbackups:capture --expire --remote production | |
# Restore to New DB | |
heroku pgbackups:restore HEROKU_POSTGRESQL_NEW_COLOR_NAME --remote production | |
# Promote upgraded DB | |
heroku pg:promote HEROKU_POSTGRESQL_NEW_COLOR_NAME --remote production | |
# Make Application Active | |
heroku ps:scale worker=1 --remote production | |
heroku maintenance:off --remote production | |
# Remove Old Database | |
heroku addons:remove HEROKU_POSTGRESQL_OLD_COLOR_NAME --remote production | |
# Or you can use --app app-name OR just the defaults if you don't have multiple heroku remotes/apps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment