Furkan Bilgin
Furkan Bilgin

Reputation: 27

Heroku db delete

The database in my heroku test application is deleted automatically after a while. Only data that was present when I deployed is protected. the others are deleted after 3 or 5 hours or so. Why am I experiencing this? What should I do?

Upvotes: 0

Views: 270

Answers (1)

Ahmet Bilgin
Ahmet Bilgin

Reputation: 154

I think it's because Heroku has a temporary filesystem (Ephemeral Filesystem). So when a dyno is restarted, all changes made to the application up to that time are undone and restored to the state you deployed.

Similar solutions are already available for this:

https://devcenter.heroku.com/articles/dynos#restarting

Added database records are deleted after restarting app (heroku/SQLAlchemy)

SQLite database hosted on Heroku getting automatically reset

Upvotes: 1

Related Questions