Permalink
Browse files

Storage::RSync Updates to support rsync daemon use

Adds 3 modes of remote operation:

- :ssh (default)
  Connects to the remote via SSH, without the use of a daemon.
- :ssh_daemon
  Connects via SSH, then to a single-use daemon spawned on the remote.
  This allows the use of certain daemon features while transferring data
  over a secure connection.
- :rsync_daemon
  Uses a direct TCP connection to an rsync daemon.

Operation will be local if no `host` is specified.
  • Loading branch information...
1 parent f38c1cf commit 49012a6011e39bea09004b3d52e0b677ae21351b Brian D. Burns committed Apr 1, 2013
Showing with 886 additions and 365 deletions.
  1. +2 −4 lib/backup/storage/base.rb
  2. +232 −92 lib/backup/storage/rsync.rb
  3. +637 −262 spec/storage/rsync_spec.rb
  4. +15 −7 templates/cli/storage/rsync
@@ -24,8 +24,6 @@ def initialize(model, storage_id = nil)
load_defaults!
end
- ##
- # Performs the backup transfer
def perform!
@package = @model.package
transfer!
@@ -69,9 +67,9 @@ def remote_path_for(package)
##
# Yields two arguments to the given block: "local_file, remote_file"
# The local_file is the full file name:
- # e.g. "2011.08.30.11.00.02.backup.tar.enc"
+ # e.g. "2011.08.30.11.00.02.trigger.tar.enc"
# The remote_file is the full file name, minus the timestamp:
- # e.g. "backup.tar.enc"
+ # e.g. "trigger.tar.enc"
def files_to_transfer_for(package)
package.filenames.each do |filename|
yield filename, filename[20..-1]
Oops, something went wrong.

0 comments on commit 49012a6

Please sign in to comment.