Sha256: 79424a168c5348d395b6a75d802cd02e30ece68094e33fa2d96a4a90547940c6

Contents?: true

Size: 706 Bytes

Versions: 6

Compression:

Stored size: 706 Bytes

Contents

module Backup
  module Storage
    class Local
      
      include Backup::CommandHelper
      
      # Store on same machine, preferentially in a different hard drive or in 
      # a mounted network path (NFS, Samba, etc)
      attr_accessor :path, :tmp_path, :final_file
      
      # Stores the backup file on local machine
      def initialize(adapter)
        self.path = adapter.procedure.get_storage_configuration.attributes['path']
        self.tmp_path   = adapter.tmp_path
        self.final_file = adapter.final_file
        
        run "mkdir -p #{path}"
        run "cp #{File.join(tmp_path, final_file).gsub('\ ', ' ')} #{File.join(path, final_file)}"
      end
      
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
backup-2.3.2.pre3 lib/backup/storage/local.rb
backup-2.3.2.pre2 lib/backup/storage/local.rb
backup-2.3.2.pre lib/backup/storage/local.rb
backup-wakiki-2.4.1 lib/backup/storage/local.rb
backup-gundua-2.3.1.2 lib/backup/storage/local.rb
backup-gundua-2.3.1.1 lib/backup/storage/local.rb