Backup::Rails
Backup rails project with backup & whenever gems
Installation
Add this line to your application's Gemfile:
gem 'backup-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install backup-rails
Usage
Generate configuration files:
$ rails g backup:rails:install
And change .env file in the root of the project.
If you don't use capistrano with whenever run:
$ whenever -w
for set crontab configuration.
Restore
Run command for archive file (general.tar or general.tar.enc):
$ backup_rails restore <path to archive> <destination path> [--ssl_password=<password>]
This command restore code to destination path and database according with database.yml in code.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request