Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

heroku addons:create heroku-postgresql:standard-0 --rollback DATABASE_URL --to '2021-06-02 20:20+00' --app scihist-digicoll-production

A new rollback database will be created, and its name will be printed to stdout e.g. postgresql-curly-82727 in this example.

Restore to it like this:

heroku pg:promote postgresql-curly-82727 --app scihist-digicoll-production

Make sure you have successfully fixed the problem by checking that e.g. the mistakenly-deleted files have been restored.

Once all is well, don’t forget to get rid of the extra database(s) you are no longer using – otherwise you’ll continue getting charged for it. heroku pg:info --app scihist-digicoll-production will show it (or them). Obviously, be really careful when doing this.

heroku addons:destroy HEROKU_POSTGRESQL_YELLOW --app scihist-digicoll-production.

Details are at https://devcenter.heroku.com/articles/heroku-postgres-rollback .

...