Methods

Class/Module Index [+]

Quicksearch

Backup::Syncer::RSync::Push

Attributes

compress[RW]

Flag for compressing (only compresses for the transfer)

ip[RW]

Server IP Address and SSH port

password[RW]

Server credentials

port[RW]

The SSH port to connect to

username[RW]

Server credentials

Public Class Methods

new(&block) click to toggle source

Instantiates a new RSync::Push or RSync::Pull Syncer.

Pre-configured defaults specified in Configuration::Syncer::RSync::Push or Configuration::Syncer::RSync::Pull are set via a super() call to RSync::Base, which in turn will invoke Syncer::Base.

Once pre-configured defaults and RSync specific defaults are set, the block from the user's configuration file is evaluated.

# File lib/backup/syncer/rsync/push.rb, line 34
def initialize(&block)
  super

  @port               ||= 22
  @compress           ||= false

  instance_eval(&block) if block_given?
end

Public Instance Methods

perform!() click to toggle source

Performs the RSync:Push operation debug options: -vhP

# File lib/backup/syncer/rsync/push.rb, line 46
def perform!
  write_password_file!

  Logger.message(
    "#{ syncer_name } started syncing the following directories:\n\s\s" +
    @directories.join("\n\s\s")
  )
  run("#{ utility(:rsync) } #{ options } #{ directories_option } " +
      "'#{ username }@#{ ip }:#{ dest_path }'")

ensure
  remove_password_file!
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.