kstrano 0.0.36 → 0.0.37
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kstrano.rb +25 -0
- metadata +1 -1
data/lib/kstrano.rb
CHANGED
@@ -24,6 +24,19 @@ require 'etc'
|
|
24
24
|
require 'new_relic/recipes'
|
25
25
|
require 'new_relic/agent'
|
26
26
|
|
27
|
+
namespace :files do
|
28
|
+
namespace :move do
|
29
|
+
|
30
|
+
desc "Rsync uploaded files from online to local"
|
31
|
+
task :to_local do
|
32
|
+
Kumastrano.say "Copying files"
|
33
|
+
log = `rsync -qazhL --progress --del --rsh=/usr/bin/ssh -e "ssh -p #{port}" --exclude "*bak" --exclude "*~" --exclude ".*" #{domain}:#{current_path}/web/uploads/* web/uploads/`
|
34
|
+
Kumastrano.say log
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
27
40
|
namespace :kuma do
|
28
41
|
|
29
42
|
namespace :ssh_socket do
|
@@ -51,6 +64,18 @@ namespace :kuma do
|
|
51
64
|
Kumastrano.say changelog, ''
|
52
65
|
end
|
53
66
|
|
67
|
+
|
68
|
+
namespace :sync do
|
69
|
+
|
70
|
+
desc "sync the database and rsync the files"
|
71
|
+
task :to_local do
|
72
|
+
files.move.to_local
|
73
|
+
Kumastrano.say "Copying database"
|
74
|
+
database.move.to_local
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
54
79
|
namespace :fix do
|
55
80
|
|
56
81
|
desc "Run fixcron for the current project"
|