AbstractBrain Answers About us →

Heroku: how to create daily database backups for free

Question

Can I have database backups on Heroku free plan?

I have a database in the entry / free tier on Heroku.

Is there any way to have automatic backups (e.g. daily backups)?

Answer

You don’t need a paid plain in order to have daily backups on Heroku PostgreSQL.

Here’s the command to enable automatic backups on Heroku:

$ heroku pg:backups:schedule DATABASE_URL --at '21:00 Europe/Rome'
Scheduling automatic daily backups of postgresql-example-123 at 21:00 Europe/Rome... done

DATABASE_URL is set automatically by Heroku, so you don’t need to replace it manually - just copy and paste the command without any changes.

Then you will see inside the Heroku Dashboard → PostgreSQL → Durability all your automatic backups.