Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 903 Bytes

README_maintenance.md

File metadata and controls

26 lines (22 loc) · 903 Bytes

Maintaining the System

Upgrade the Postgres DB

Assume the existing database is called postgresql-horizontal-343434.

  heroku login
  heroku addons:create -a bc-court-reminders heroku-postgresql:standard-0

This will create a new database instance, for example postgresql-triangular-121212.

heroku pg:wait -a bc-court-reminders 
heroku maintenance:on -a bc-court-reminders
heroku pg:copy -a bc-court-reminders postgresql-horizontal-343434 postgresql-triangular-121212
heroku pg:promote -a bc-court-reminders postgresql-triangular-121212
<UPDATE ALL THE ENVIRONMENT VARIABLES>
heroku maintenance:off -a bc-court-reminders
heroku addons:destroy -a bc-court-reminders-dev postgresql-horizontal-343434

Then set up daily backups:

  heroku pg:backups:schedule -a bc-court-reminders --at '03:00 America/New_York'
  heroku pg:backups -a bc-court-reminders