backup_rails 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/backup_rails.gemspec +4 -3
- data/examples/backup +3 -0
- data/examples/schedule.rb +12 -3
- data/lib/backup_rails/version.rb +1 -1
- metadata +111 -93
data/README.md
CHANGED
@@ -26,6 +26,10 @@ For now just add the gem to your Gemfile.
|
|
26
26
|
Move the files in /examples dir into your project.
|
27
27
|
Run whenever to setup your cron job. Make sure you've set the RAILS_ENV correctly.
|
28
28
|
|
29
|
+
When cron jobs are not run make sure you:
|
30
|
+
|
31
|
+
sudo touch /etc/cron.deny
|
32
|
+
|
29
33
|
## Contributing
|
30
34
|
|
31
35
|
Very welcome.. :)
|
data/backup_rails.gemspec
CHANGED
@@ -17,8 +17,9 @@ Gem::Specification.new do |gem|
|
|
17
17
|
|
18
18
|
# For backup
|
19
19
|
gem.add_dependency 'backup', '>= 3.0.24'
|
20
|
-
gem.add_dependency '
|
21
|
-
gem.add_dependency 'net-
|
22
|
-
gem.add_dependency '
|
20
|
+
gem.add_dependency 'fog', '~> 1.1.0' # S3
|
21
|
+
gem.add_dependency 'net-ssh', '~> 2.3.0'
|
22
|
+
gem.add_dependency 'net-sftp', '~> 2.0.5'
|
23
|
+
gem.add_dependency 'mail', '~> 2.4.0'
|
23
24
|
gem.add_dependency 'whenever' # For cronjob config, see config/schedule.rb
|
24
25
|
end
|
data/examples/backup
ADDED
data/examples/schedule.rb
CHANGED
@@ -1,8 +1,17 @@
|
|
1
|
-
#
|
1
|
+
# env :PATH, ENV['PATH'] # '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
|
2
|
+
# env :RAILS_ENV, ENV['RAILS_ENV']
|
3
|
+
# env :HOME, ENV['HOME']
|
4
|
+
# env :SHELL, ENV['SHELL']
|
5
|
+
|
6
|
+
env :MAILTO, 'your@email.com'
|
7
|
+
|
8
|
+
set :output, {:error => 'log/cron_error.log', :standard => '/dev/null'}
|
9
|
+
job_type :script, "cd :path && RAILS_ENV=:environment bundle exec script/:task :output"
|
2
10
|
|
3
11
|
# Backup using the RAILS_ROOT/config/backup.rb backup gem script.
|
4
12
|
# Schedule it using:
|
5
13
|
# whenever
|
6
14
|
every 1.day, :at => '2:30 am' do
|
7
|
-
|
8
|
-
|
15
|
+
# every 1.minute do
|
16
|
+
script 'backup'
|
17
|
+
end
|
data/lib/backup_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,136 +1,154 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: backup_rails
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Joost Hietbrink
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
17
|
+
date: 2012-07-19 00:00:00 +02:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: backup
|
16
|
-
|
17
|
-
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 3
|
29
|
+
- 0
|
30
|
+
- 24
|
21
31
|
version: 3.0.24
|
22
32
|
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: fog
|
23
36
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
-
|
31
|
-
|
32
|
-
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 1
|
44
|
+
- 0
|
45
|
+
version: 1.1.0
|
38
46
|
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: net-ssh
|
39
50
|
prerelease: false
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
-
|
47
|
-
|
48
|
-
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 2
|
57
|
+
- 3
|
58
|
+
- 0
|
59
|
+
version: 2.3.0
|
54
60
|
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: net-sftp
|
55
64
|
prerelease: false
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
-
|
63
|
-
|
64
|
-
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 2
|
71
|
+
- 0
|
72
|
+
- 5
|
73
|
+
version: 2.0.5
|
70
74
|
type: :runtime
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: mail
|
71
78
|
prerelease: false
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
-
|
79
|
-
|
80
|
-
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ~>
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
segments:
|
84
|
+
- 2
|
85
|
+
- 4
|
86
|
+
- 0
|
87
|
+
version: 2.4.0
|
86
88
|
type: :runtime
|
89
|
+
version_requirements: *id005
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: whenever
|
87
92
|
prerelease: false
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
version: "0"
|
100
|
+
type: :runtime
|
101
|
+
version_requirements: *id006
|
94
102
|
description: Easy use backup gem with Rails.
|
95
|
-
email:
|
103
|
+
email:
|
96
104
|
- joost@joopp.com
|
97
105
|
executables: []
|
106
|
+
|
98
107
|
extensions: []
|
108
|
+
|
99
109
|
extra_rdoc_files: []
|
100
|
-
|
110
|
+
|
111
|
+
files:
|
101
112
|
- .gitignore
|
102
113
|
- Gemfile
|
103
114
|
- LICENSE
|
104
115
|
- README.md
|
105
116
|
- Rakefile
|
106
117
|
- backup_rails.gemspec
|
118
|
+
- examples/backup
|
107
119
|
- examples/backup.rb
|
108
120
|
- examples/schedule.rb
|
109
121
|
- lib/backup_rails.rb
|
110
122
|
- lib/backup_rails/version.rb
|
111
|
-
|
123
|
+
has_rdoc: true
|
124
|
+
homepage: ""
|
112
125
|
licenses: []
|
126
|
+
|
113
127
|
post_install_message:
|
114
128
|
rdoc_options: []
|
115
|
-
|
129
|
+
|
130
|
+
require_paths:
|
116
131
|
- lib
|
117
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
requirements:
|
126
|
-
- -
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
|
132
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
segments:
|
137
|
+
- 0
|
138
|
+
version: "0"
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
segments:
|
144
|
+
- 0
|
145
|
+
version: "0"
|
129
146
|
requirements: []
|
147
|
+
|
130
148
|
rubyforge_project:
|
131
|
-
rubygems_version: 1.
|
149
|
+
rubygems_version: 1.3.6
|
132
150
|
signing_key:
|
133
151
|
specification_version: 3
|
134
152
|
summary: Easy use backup gem with Rails.
|
135
153
|
test_files: []
|
136
|
-
|
154
|
+
|