我可以使用Heroku PG Backup插件安排备份吗? [英] Can I schedule backups using the Heroku PG Backup add-on?

查看:114
本文介绍了我可以使用Heroku PG Backup插件安排备份吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在使用 PG备份加载项,并且一切正常,但是这个早上10点钟开始备份过程在早上在我的应用程序中生成一些块和超时。

有没有一种方法可以指定使用此加载项进行备份的计划?

解决方案

使用Cron进行手动备份计划



Heroku提供两种类型的备份:自动和用户启动。每个计划都保留不同数量的每日,每周和手动备份。您无法使用 PG备份自动控制自动备份的时间,但您可以使用cron触发

例如:

  #每四小时触发一次手动备份。 
0 * / 4 * * * source $ HOME / database_credentials; heroku pgbackups:捕获

请参阅创建备份以获取更多关于使用pgbackups命令的信息。


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.

解决方案

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.

这篇关于我可以使用Heroku PG Backup插件安排备份吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆