Heroku automatic db backup via cron job
Is it possible to backup Heroku database 开发者_开发知识库using cron jobs?
I tried putting the following line into cron.rake:
heroku pgbackups:capture --expire
However it didn't work. The line works when I run it from Terminal.
Can you help?
Check out the heroku_s3_backup gem, which packages up the code necessary to do this in a neat way.
The gem heroku_backup_task integrates directly with the free PG Backups add-on for Heroku.
精彩评论