Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automate db backup of live site #79

Open
bluebindu opened this issue Aug 6, 2014 · 0 comments
Open

automate db backup of live site #79

bluebindu opened this issue Aug 6, 2014 · 0 comments
Assignees

Comments

@bluebindu
Copy link
Collaborator

  1. cron (free for daily)

to automate tasks that you want to run - like the pgbackups task in the previous item - create a rake file lib/tasks/cron.rake then add your code within a 'task :cron => :environment' block and it will be executed daily. The timing of this cron job is at the same time every day as the time you added the cron addon

$ heroku addons:add cron:daily

There's a nice gem to manage backups easily and store them in S3 which you can use by adding this to your Gemfile

gem 'heroku_backup_task'

and then adding a simple rake task in lib/tasks like this

require "heroku_backup_task/tasks" task :cron => :heroku_backup

@bluebindu bluebindu self-assigned this Aug 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant