bonethug 0.0.21 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -2
- data/config/schedule.rb +4 -2
- data/lib/bonethug/cli.rb +5 -1
- data/lib/bonethug/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -97,8 +97,11 @@ Host *
|
|
97
97
|
|
98
98
|
**Trigger a Backup from the Remote Server**
|
99
99
|
|
100
|
-
*This wraps mina and runs the backup task in the bonethug
|
101
|
-
the
|
100
|
+
*This wraps mina and runs the backup task in the local .bonethug/deploy.rb file.
|
101
|
+
It calls astrails-safe on the remote server and using the remote
|
102
|
+
.bonethug/backup.rb file which pulls the info out of the remote config/cnf.yml.
|
103
|
+
If you are using FTP, make sure the directory exists before triggering a
|
104
|
+
backup.*
|
102
105
|
|
103
106
|
`bonethug remote-backup {develoment|staging|production}`
|
104
107
|
|
data/config/schedule.rb
CHANGED
@@ -29,6 +29,8 @@ base_path = File.expand_path(File.dirname(__FILE__))+"/../../../current"
|
|
29
29
|
set :output, {:error => base_path+'/log/cron_error.log', :standard => base_path+'/log/cron.log'}
|
30
30
|
|
31
31
|
# actual jobs
|
32
|
-
|
33
|
-
|
32
|
+
if @environment == 'production'
|
33
|
+
every 1.day, :at => '11 pm' do
|
34
|
+
command "cd #{base_path} && export to=#{@environment} && bundle exec astrails-safe .bonethug/backup.rb"
|
35
|
+
end
|
34
36
|
end
|
data/lib/bonethug/cli.rb
CHANGED
@@ -41,7 +41,7 @@ module Bonethug
|
|
41
41
|
# run the initaliser
|
42
42
|
Installer.bonethugise(location, task.to_sym)
|
43
43
|
|
44
|
-
when 'deploy', 'setup', 'remote-backup', 'local-backup', '
|
44
|
+
when 'deploy', 'setup', 'remote-backup', 'local-backup', 'sync-to', 'sync-from'
|
45
45
|
|
46
46
|
# handle args
|
47
47
|
environment = ARGV[1]
|
@@ -61,6 +61,10 @@ module Bonethug
|
|
61
61
|
exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb backup --verbose"
|
62
62
|
when 'local-backup'
|
63
63
|
exec "export to=#{environment} && bundle exec astrails-safe .bonethug/backup.rb"
|
64
|
+
when 'sync-to'
|
65
|
+
exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb sync_to --verbose"
|
66
|
+
when 'sync-from'
|
67
|
+
exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb sync_from --verbose"
|
64
68
|
end
|
65
69
|
|
66
70
|
when 'watch'
|
data/lib/bonethug/version.rb
CHANGED