Sha256: ad59472946e38c921d5e949492ba649a05f5beaa0d5c0b722bc489ac4895e300

Contents?: true

Size: 752 Bytes

Versions: 12

Compression:

Stored size: 752 Bytes

Contents

require 'backup/connection/cloudfiles'

module Backup
  module Record
    class CloudFiles < Backup::Record::Base

      alias_attribute :container, :bucket

      def load_specific_settings(adapter)
        self.container = adapter.procedure.get_storage_configuration.attributes['container']
      end

      private

        def self.destroy_backups(procedure, backups)
          cf = Backup::Connection::CloudFiles.new
          cf.static_initialize(procedure)
          cf.connect
          backups.each do |backup|
            puts "\nDestroying backup \"#{backup.filename}\" from container \"#{backup.container}\"."
            cf.destroy(backup.filename, backup.container)
            backup.destroy
          end
        end

    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
backup-2.4.5.1 lib/backup/record/cloudfiles.rb
backup-2.4.5 lib/backup/record/cloudfiles.rb
namxam-backup-2.4.5 lib/backup/record/cloudfiles.rb
backup-2.4.4 lib/backup/record/cloudfiles.rb
backup-2.4.3 lib/backup/record/cloudfiles.rb
backup-2.4.1 lib/backup/record/cloudfiles.rb
dmitryv-backup-2.4.0 lib/backup/record/cloudfiles.rb
backup-2.4.0 lib/backup/record/cloudfiles.rb
backup-2.3.3.1 lib/backup/record/cloudfiles.rb
backup-2.3.3 lib/backup/record/cloudfiles.rb
backup-2.3.2 lib/backup/record/cloudfiles.rb
backup-2.3.2.pre3 lib/backup/record/cloudfiles.rb