Sha256: c5fabc52db81fff7441b5c514262b3d0f92ccb8c7e788972a1873d0cc6bf4a80

Contents?: true

Size: 698 Bytes

Versions: 9

Compression:

Stored size: 698 Bytes

Contents

require 'backup/connection/s3'

module Backup
  module Record
    class S3 < Backup::Record::Base
      
      def load_specific_settings(adapter)
        self.bucket = adapter.procedure.get_storage_configuration.attributes['bucket']
      end
      
      private
        
        def self.destroy_backups(procedure, backups)
          s3 = Backup::Connection::S3.new
          s3.static_initialize(procedure)
          s3.connect
          backups.each do |backup|
            puts "\nDestroying backup \"#{backup.filename}\" from bucket \"#{backup.bucket}\"."
            s3.destroy(backup.filename, backup.bucket)
            backup.destroy
          end
        end
        
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
dmitryv-backup-2.4.0 lib/backup/record/s3.rb
backup-2.4.0 lib/backup/record/s3.rb
backup-2.3.3.1 lib/backup/record/s3.rb
backup-2.3.3 lib/backup/record/s3.rb
backup-2.3.2 lib/backup/record/s3.rb
backup-2.3.2.pre3 lib/backup/record/s3.rb
backup-2.3.2.pre2 lib/backup/record/s3.rb
backup-2.3.2.pre lib/backup/record/s3.rb
backup-wakiki-2.4.1 lib/backup/record/s3.rb