Can I schedule backups using the Heroku PG Backup add-on? Can I schedule backups using the Heroku PG Backup add-on? postgresql postgresql

Can I schedule backups using the Heroku PG Backup add-on?


Use Cron for Manual Backup Scheduling

Heroku gives you two types of backups: automated and user-initiated. Each plan has a different number of daily, weekly, and manual backups that are retained. You can't control when the automated backups occur with PG Backups Auto, but you can use cron to trigger a "manual" backup at any time.

For example:

# Trigger a "manual" backup every four hours.0 */4 * * * source $HOME/database_credentials; heroku pgbackups:capture

See Creating a Backup for more information about using the pgbackups command.


No, there is no way to do it currently, aside from using an external process to fire the calls.

An email to support might reveal more.


While the original question is old, Heroku does have a schedule option for PGBackups now:

https://devcenter.heroku.com/articles/heroku-postgres-backups#scheduling-backups