backupgem 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/README +4 -4
- data/doc/index.html +5 -5
- data/examples/mediawiki.rb +1 -1
- data/lib/backup/actor.rb +1 -1
- data/lib/backup/configuration.rb +0 -1
- data/tests/ssh_test.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/README
CHANGED
@@ -218,9 +218,9 @@ or your own:
|
|
218
218
|
====Action====
|
219
219
|
Delivery is supported via <tt>scp</tt>, <tt>ftp</tt>, and <tt>mv</tt>
|
220
220
|
|
221
|
-
action :
|
222
|
-
action :
|
223
|
-
action :
|
221
|
+
action :deliver, :method => :scp
|
222
|
+
action :deliver, :method => :ftp
|
223
|
+
action :deliver, :method => :mv
|
224
224
|
|
225
225
|
The <tt>:mv</tt> action is defined like any user-defined action:
|
226
226
|
|
@@ -338,7 +338,7 @@ Thankfully, this is incredibly simple:
|
|
338
338
|
dump # make sure you return the name of the file
|
339
339
|
end
|
340
340
|
|
341
|
-
action :
|
341
|
+
action :deliver, :method => :scp
|
342
342
|
action :rotate, :method => :via_ssh
|
343
343
|
|
344
344
|
set :servers, %w{ my.server.com }
|
data/doc/index.html
CHANGED
@@ -324,9 +324,9 @@ or your own:
|
|
324
324
|
<p><i>Full <span class="caps">FTP</span> support is <a href="#Known_Bugs_and_Limitations_TODO">unfinished</a>. Currently, only <code><span class="ident">scp</span></code> and <code><span class="ident">mv</span></code> fully support rotation</i></p>
|
325
325
|
|
326
326
|
|
327
|
-
<div class='example'><pre><code> <span class="ident">action</span> <span class="symbol">:
|
328
|
-
<span class="ident">action</span> <span class="symbol">:
|
329
|
-
<span class="ident">action</span> <span class="symbol">:
|
327
|
+
<div class='example'><pre><code> <span class="ident">action</span> <span class="symbol">:deliver</span><span class="punct">,</span> <span class="symbol">:method</span> <span class="punct">=></span> <span class="symbol">:scp</span>
|
328
|
+
<span class="ident">action</span> <span class="symbol">:deliver</span><span class="punct">,</span> <span class="symbol">:method</span> <span class="punct">=></span> <span class="symbol">:ftp</span>
|
329
|
+
<span class="ident">action</span> <span class="symbol">:deliver</span><span class="punct">,</span> <span class="symbol">:method</span> <span class="punct">=></span> <span class="symbol">:mv</span></code></pre></div>
|
330
330
|
The <code><span class="symbol">:mv</span></code> action is defined (in <code><span class="ident">backup</span><span class="punct">/</span><span class="ident">recipes</span><span class="punct">/</span><span class="ident">standard</span><span class="punct">.</span><span class="ident">rb</span></code>) like any user-defined action:
|
331
331
|
<div class='example'><pre><code> <span class="ident">action</span><span class="punct">(</span><span class="symbol">:mv</span><span class="punct">)</span> <span class="keyword">do</span>
|
332
332
|
<span class="ident">sh</span> <span class="punct">"</span><span class="string">mv <span class="expr">#{last_result}</span> <span class="expr">#{c[:backup_path]}</span>/</span><span class="punct">"</span>
|
@@ -482,7 +482,7 @@ Thankfully, this is incredibly simple:
|
|
482
482
|
<span class="ident">dump</span> <span class="comment"># make sure you return the name of the file</span>
|
483
483
|
<span class="keyword">end</span>
|
484
484
|
|
485
|
-
<span class="ident">action</span> <span class="symbol">:
|
485
|
+
<span class="ident">action</span> <span class="symbol">:deliver</span><span class="punct">,</span> <span class="symbol">:method</span> <span class="punct">=></span> <span class="symbol">:scp</span>
|
486
486
|
<span class="ident">action</span> <span class="symbol">:rotate</span><span class="punct">,</span> <span class="symbol">:method</span> <span class="punct">=></span> <span class="symbol">:via_ssh</span>
|
487
487
|
|
488
488
|
<span class="ident">set</span> <span class="symbol">:servers</span><span class="punct">,</span> <span class="punct">%w{</span><span class="string"> my.server.com </span><span class="punct">}</span>
|
@@ -705,7 +705,7 @@ Thankfully, this is incredibly simple:
|
|
705
705
|
|
706
706
|
<div id="footer">
|
707
707
|
<p>
|
708
|
-
© 2006 <a href="mailto:nate+backupgem@natemurray.com">Nate Murray</a>. <span class="last_updated">Last updated
|
708
|
+
© 2006 <a href="mailto:nate+backupgem@natemurray.com">Nate Murray</a>. <span class="last_updated">Last updated Tue Oct 10 09:20:53 PDT 2006</span>
|
709
709
|
</p>
|
710
710
|
|
711
711
|
</div>
|
data/examples/mediawiki.rb
CHANGED
@@ -13,7 +13,7 @@ action(:content) do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# action :compress, :method => :tar_bz2 # could be set in global
|
16
|
-
# action :
|
16
|
+
# action :deliver, :method => :scp # could be set in global
|
17
17
|
|
18
18
|
# settings for backup servers are global unless specified otherwise
|
19
19
|
# rotate settings are global unless specified herer
|
data/lib/backup/actor.rb
CHANGED
@@ -71,7 +71,7 @@ module Backup
|
|
71
71
|
def define_action(name, options={}, &block)
|
72
72
|
@action[name] = (options[:action_class] || Action).new(name, self, options)
|
73
73
|
|
74
|
-
if self.respond_to?(name) && !block_given?
|
74
|
+
if self.respond_to?(name) && !( block_given? || options[:method] )
|
75
75
|
# if it was already defined and we aren't trying to re-define it then
|
76
76
|
# what we are trying to do is define it the same way it is defined now
|
77
77
|
# only with options being sent to it.
|
data/lib/backup/configuration.rb
CHANGED
data/tests/ssh_test.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: backupgem
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2006-10-
|
6
|
+
version: 0.0.3
|
7
|
+
date: 2006-10-10 00:00:00 -07:00
|
8
8
|
summary: Beginning-to-end solution for backups and rotation.
|
9
9
|
require_paths:
|
10
10
|
- lib
|