Edo : a Thor script to backup heroku hosted apps
This script uses a yaml config file to store : heroku and s3 credentials and the names of the apps you want to backup. After that this is pretty straight forward : run it and it will backup your apps.
How it works
The script start by making a new backup of your app (except if you pass the --old option, then it will use the last one) at Heroku. Then it will get the url, download it locally in a backups folder, and then it will proceed to upload it in a YOURAPPNAME-backup bucket in your S3 account. The bucket suffix can be set in the config.yaml file.
Get it running
- Clone the code
- Get your self a nice ruby env ready (rvm, ruby 1.9.2, bundler)
- Get the gems : bundle install
- Set the config : cp config.yaml.sample config.yaml && vim config.yaml
- Fire it up : bundle exec ruby edo_script.rb backup
You might want to read : https://github.com/wycats/thor to debug or do stuff around with it.
If you have any suggestions or ideas, or just need to adapt the script to your needs make a fork on github : https://github.com/mcansky/edo_script . You can report issues and make pull request through this mean too.
Under MIT license (see LICENSE file).