Can I recover a deprovisioned production (non-Hobby) Heroku Postgres database?

Issue

I need to recover a deleted production-tier Heroku Postgres database

Resolution

You're able to recover a production-tier database for up to 10 days after it has been deprovisioned.

To do so:

  1. Get the old database URL for the resource, e.g. from heroku releases:info --app <old app>.
  2. Create a new database with heroku addons:create heroku-postgresql:<plan> --app <recovery-app> --fork <old-database-url>. recovery-app can be any Heroku app you own, which is useful if an entire app was deleted but you still have the DATABASE_URL for the deleted database.
  3. Wait for the database to become available with heroku pg:wait --app <recovery-app>.

If this doesn't work for some reason, you may be able to restore a PGBackup even if the database was recently deleted. If the app is not deleted, you can check if there is any backups that can be used for the recovery (heroku pg:backups -a APP_NAME).

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2020 Salesforce.com