Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some new info.

  • Loading branch information...
commit 876d6234c97838c31c7104f937ac6c48d05afd62 1 parent 3ae6631
@joost authored
View
4 README.md
@@ -26,6 +26,10 @@ For now just add the gem to your Gemfile.
Move the files in /examples dir into your project.
Run whenever to setup your cron job. Make sure you've set the RAILS_ENV correctly.
+When cron jobs are not run make sure you:
+
+ sudo touch /etc/cron.deny
+
## Contributing
Very welcome.. :)
View
3  backup_rails.gemspec
@@ -16,7 +16,8 @@ Gem::Specification.new do |gem|
gem.version = BackupRails::VERSION
# For backup
- gem.add_dependency 'backup', '~> 3.0.24'
+ gem.add_dependency 'backup', '>= 3.0.24'
+ gem.add_dependency 'fog', '~> 1.1.0' # S3
gem.add_dependency 'net-ssh', '~> 2.3.0'
gem.add_dependency 'net-sftp', '~> 2.0.5'
gem.add_dependency 'mail', '~> 2.4.0'
View
3  examples/backup
@@ -0,0 +1,3 @@
+# Put this file in rails_project/script/backup
+#!/bin/bash
+backup perform --trigger mmmenu --config_file config/backup.rb --data-path db --log-path log --tmp-path tmp
View
15 examples/schedule.rb
@@ -1,8 +1,17 @@
-# Put this file in rails_project/config/schedule.rb
+ # env :PATH, ENV['PATH'] # '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
+# env :RAILS_ENV, ENV['RAILS_ENV']
+# env :HOME, ENV['HOME']
+# env :SHELL, ENV['SHELL']
+
+env :MAILTO, 'your@email.com'
+
+set :output, {:error => 'log/cron_error.log', :standard => '/dev/null'}
+job_type :script, "cd :path && RAILS_ENV=:environment bundle exec script/:task :output"
# Backup using the RAILS_ROOT/config/backup.rb backup gem script.
# Schedule it using:
# whenever
every 1.day, :at => '2:30 am' do
- command "bundle exec backup perform --trigger your_project --config_file config/backup.rb --data-path db --log-path log --tmp-path tmp"
-end
+# every 1.minute do
+ script 'backup'
+end
View
2  lib/backup_rails/version.rb
@@ -1,3 +1,3 @@
module BackupRails
- VERSION = "0.0.1"
+ VERSION = "0.0.3"
end
Please sign in to comment.
Something went wrong with that request. Please try again.