Class: Backup::Syncer::Cloud::S3

Inherits:
Base
  • Object
show all
Defined in:
lib/backup/syncer/cloud/s3.rb

Defined Under Namespace

Classes: Error

Instance Attribute Summary collapse

Attributes inherited from Base

#excludes, #mirror, #path, #syncer_id

Instance Method Summary collapse

Methods inherited from Base

#add, #directories, #exclude

Methods included from Config::Helpers

included

Methods included from Utilities::Helpers

#utility_remote

Constructor Details

#initialize(syncer_id = nil) ⇒ S3

Returns a new instance of S3.



48
49
50
51
52
53
54
# File 'lib/backup/syncer/cloud/s3.rb', line 48

def initialize(syncer_id = nil)
  super

  @storage_class ||= :standard

  check_configuration
end

Dynamic Method Handling

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

Instance Attribute Details

#access_key_idObject

Amazon Simple Storage Service (S3) Credentials



12
13
14
# File 'lib/backup/syncer/cloud/s3.rb', line 12

def access_key_id
  @access_key_id
end

#bucketObject

Amazon S3 bucket name



16
17
18
# File 'lib/backup/syncer/cloud/s3.rb', line 16

def bucket
  @bucket
end

#encryptionObject

Encryption algorithm to use for Amazon Server-Side Encryption

Supported values:

  • :aes256

Default: nil



30
31
32
# File 'lib/backup/syncer/cloud/s3.rb', line 30

def encryption
  @encryption
end

#fog_optionsObject

Additional options to pass along to fog. e.g. Fog::Storage.new({ :provider => ‘AWS’ }.merge(fog_options))



46
47
48
# File 'lib/backup/syncer/cloud/s3.rb', line 46

def fog_options
  @fog_options
end

#regionObject

Region of the specified S3 bucket



20
21
22
# File 'lib/backup/syncer/cloud/s3.rb', line 20

def region
  @region
end

#secret_access_keyObject

Amazon Simple Storage Service (S3) Credentials



12
13
14
# File 'lib/backup/syncer/cloud/s3.rb', line 12

def secret_access_key
  @secret_access_key
end

#storage_classObject

Storage class to use for the S3 objects uploaded

Supported values:

  • :standard (default)

  • :reduced_redundancy

Default: :standard



41
42
43
# File 'lib/backup/syncer/cloud/s3.rb', line 41

def storage_class
  @storage_class
end

#use_iam_profileObject

Amazon Simple Storage Service (S3) Credentials



12
13
14
# File 'lib/backup/syncer/cloud/s3.rb', line 12

def use_iam_profile
  @use_iam_profile
end