Riserva
This gem performs backup of selected folders to cloud drive. The following storages supported in current version:
- Dropbox dropbox_api gem
- Google Drive (service account) google-drive-ruby gem
Please, refer to the documentation of corresponding gems to learn how to create storage API keys.
Installation
Add this line to your application's Gemfile:
gem 'riserva'
And then execute:
$ bundle
Or install it yourself as:
$ gem install riserva
Usage
Riserva provides executable which is added to system PATH.
$ riserva --help
Usage: riserva [-pCv]
Specific options:
-p, --perform=OPERATION Operation to perform, valid options: backup (default)
-C, --config=CONFIG Path to riserva.yml, can also be defined as RISERVA_CONFIG environment variable
Common options:
--help Show this message
-v, --version Show version
Usage example:
riserva --config '/home/user/.riserva/config.yml' --perform backup
Example config:
# Where to save created archives in local file system
storage_location: '/home/user/backup'
# Enable system notifications (if notification library installed in your OS)
system_notifications: true
# Set custom notification icon
notification_icon: '/home/user/.riserva/icon.png'
# Each folder will be compressed in separate archive
folders:
- '/home/user/some_important_folder_1'
- '/home/user/some_important_folder_2'
- '/home/user/some_important_folder_3'
# Log settings
log:
filename: '/home/user/.riserva/riserva.log'
# Storage configuration. Multiple storage providers supported simultaneously.
storage:
google_drive:
secrets: '/home/user/.riserva/google_drive_secrets.json'
dropbox:
secrets: '/home/user/.riserva/dropbox_secrets.json'
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/psyipm/riserva.
License
The gem is available as open source under the terms of the MIT License.