underScorePassionFruit
underScorePassionFruit

Reputation: 325

Looking for heroku db backup

By accident I run a script which was supposed to go through all rows and change a field in each row. But it messed up and set this field nil for each of the rows. I am looking for a way to get the previous version of my prod. db, does heroku keep automatically db dumps?

Upvotes: 0

Views: 39

Answers (3)

Anoob K Bava
Anoob K Bava

Reputation: 605

At first you need to install PgAdmin http://www.pgadmin.org/ then you need to connect your heroku database with the PgAdmin for that.

  1. login to heroku dev center

  2. Go to dash board --> databases-->select app database --> connection settings

  3. Copy the details like database name, password,host

  4. Click on add a new connection in PgAdmin

  5. Paste above settings. Now you have live db connection like Heroku, then backup from PgAdmin there.

Upvotes: 1

Simone Carletti
Simone Carletti

Reputation: 176382

Heroku provides a backup service called PGBackups, however you should have either configured it to run your backups periodically, or run a manual backup before performing the operation.

If you didn't configure any backup, then your only chance is to contact Heroku support and check if they can recover a previous backup for you.

Needless to say that you should always be prepared for such circumstance and you should really have configured a backup of your data.

Upvotes: 0

virtual_monk
virtual_monk

Reputation: 120

It looks like you have to have manually backup your DB prior to a mess up. https://devcenter.heroku.com/articles/heroku-postgres-backups

Upvotes: 1

Related Questions