7

I have been using PG Backups add-on recently and everything has worked fine, however this morning the backup process triggered at 10:00 A.M. in the morning generating some blocks and timeouts in my application.

Is there a way to specify the schedule of the backups made with this add-on? I've been searching and haven't found anything specific.

tshepang
  • 12,111
  • 21
  • 91
  • 136
user1916780
  • 73
  • 1
  • 3

3 Answers3

4

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.

Todd A. Jacobs
  • 81,402
  • 15
  • 141
  • 199
3

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.

Neil Middleton
  • 22,105
  • 18
  • 80
  • 134
0

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

CanuckT
  • 321
  • 1
  • 3
  • 14