Class: Backup::Syncer::RSync::Pull

Inherits:
Push show all
Defined in:
lib/backup/syncer/rsync/pull.rb

Constant Summary

Constants included from CLI::Helpers

CLI::Helpers::UTILITY

Instance Attribute Summary

Attributes inherited from Push

#compress, #ip, #password, #port, #username

Attributes inherited from Base

#additional_options

Attributes inherited from Base

#mirror, #path

Instance Method Summary collapse

Methods inherited from Push

#initialize

Methods inherited from Base

#initialize

Methods inherited from Base

#add, #directories, #initialize

Methods included from Configuration::Helpers

included

Constructor Details

This class inherits a constructor from Backup::Syncer::RSync::Push

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Backup::Configuration::Helpers

Instance Method Details

#perform!Object

Performs the RSync::Pull operation debug options: -vhP



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/backup/syncer/rsync/pull.rb', line 11

def perform!
  write_password_file!

  @directories.each do |directory|
    Logger.message("#{ syncer_name } started syncing '#{ directory }'.")
    run("#{ utility(:rsync) } #{ options } " +
        "'#{ username }@#{ ip }:#{ directory.sub(/^\~\//, '') }' " +
        "'#{ dest_path }'")
  end

ensure
  remove_password_file!
end