Class: Bard::Backup::S3Destination

Inherits:
Destination
  • Object
show all
Defined in:
lib/bard/backup/destination/s3_destination.rb

Instance Method Summary collapse

Methods inherited from Destination

build

Instance Method Details

#callObject



10
11
12
13
14
# File 'lib/bard/backup/destination/s3_destination.rb', line 10

def call
  strategy.call(s3_tree, now)
  Deleter.new(s3_tree, now).call
  Bard::Backup.new(timestamp: now, destinations: [info])
end

#infoObject



20
21
22
# File 'lib/bard/backup/destination/s3_destination.rb', line 20

def info
  config.slice(:name, :type, :path, :region)
end

#s3_treeObject



16
17
18
# File 'lib/bard/backup/destination/s3_destination.rb', line 16

def s3_tree
  @s3_tree ||= S3Tree.new(**config.slice(:endpoint, :path, :access_key_id, :secret_access_key, :session_token, :region, :encryption_key))
end