Search code examples
postgresqlherokuheroku-postgres

Heroku Postgres professional tier database plan shows "no backup?


We have a premium 2 plan which is in staging right now. When I use the command heroku pg:backups --app APPNAME, it shows

no backup capture one with heroku pg:backups:capture

The documentation says continuous protection is available with professional tier database plan which we have but still not able to see any backups.


Solution

  • Heroku's "continuous protection" for PostgreSQL refers to write ahead log (WAL) files being written to external storage. This is different from the logical PGBackups service.

    You can roll your database back to an earlier state from WAL files by creating a new Postgres database with heroku addons:create using the --rollback option. Run

    heroku pg:info --app APPNAME
    

    to see if this is available for your database. You should see a Rollback value.

    It is probably also a good idea to schedule regular logical backups using PGBackup, e.g. via

    heroku pg:backups:schedule DATABASE_URL --at '02:00 America/Los_Angeles' --app APPNAME