Backup rails project with backup & whenever gems
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install backup-rails
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.
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.
- 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