user1916780
user1916780

Reputation: 73

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

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.

Upvotes: 7

Views: 3082

Answers (3)

CanuckT
CanuckT

Reputation: 371

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

Upvotes: 0

Todd A. Jacobs
Todd A. Jacobs

Reputation: 84343

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.

Upvotes: 4

Neil Middleton
Neil Middleton

Reputation: 22238

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.

Upvotes: 3

Related Questions