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 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 deploy.rb file. Uses
101
- the info contained in cnf.yml*
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
- every 1.day, :at => '11 pm' do
33
- command "cd #{base_path} && export to=#{@environment} && bundle exec astrails-safe .bonethug/backup.rb"
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', 'rsync-to-backup', 'rsync-from-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'
@@ -1,3 +1,3 @@
1
1
  module Bonethug
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bonethug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: