Class: AwsTools::S3::Bucket::Synchronize

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_tools/s3.rb

Overview

Synchronize.

Performs the synchronization of one bucket.

One way synchronization, source to destination based on modification time.

Instance Method Summary collapse

Constructor Details

#initialize(bucket, backup_bucket, options = {}) ⇒ Synchronize

Initializer.

Required parameters:

bucket: source bucket backup_bucket: destination bucket



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/aws_tools/s3.rb', line 41

def initialize(bucket, backup_bucket, options = {})
  puts "AwsTools::S3::Bucket::Synchronize initialize"

  @bucket =         bucket
  @backup_bucket =  backup_bucket

  options.each_pair do |key, value| 
    self.send("#{key}=", value)
  end

  perform_synchronization
end