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



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

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

#infoObject



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

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

#s3_treeObject



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

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