BackupFoundation

This is a experimental pre-alpha version of backup client ruby gem for Website cloud backup service Backup.Foundation. It is not recommended to use it now.

Installation

Add this line to your application's Gemfile:

gem 'backup_foundation'

And then execute:

$ bundle
$ bundle exec rails g backup_foundation:install

Don't forget to set your App Key from Backup.Foundation in config/initializers/backup_foundation.rb

Usage

To make a backup and send it to cloud:

$ bundle exec rake backup_foundation:backup

To download backup from server and restore it on server:

$ bundle exec rake backup_foundation:restore

Whenever scheduling

You can schedule making backups with following addition into your config/schedule.rb:

every 1.day, at: '9:30pm' do
  rake 'backup_foundation:backup'
end

Capistrano integration

You can install support for Capistrano by adding following line

require 'backup_foundation/capistrano'

into your Capfile (for Capistrano 3) or into your config/deploy.rb (for Capistrano 2).

Gem supports two following commands through capistrano:

$ bundle exec cap production backup_foundation:backup

And

$ bundle exec cap production backup_foundation:restore

By default, commands will be executed on servers in role app. You can change it by setting

set :backup_foundation_roles, ->{ :another_role }

in Capistrano 3 and

_cset(:backup_foundation_roles) { :another_role }

in Capistrano 2 in your config/deploy.rb.

Contributing

  1. Fork it ( https://github.com/sandrew/backup_foundation/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request