Sha256: b1c7674b1366437ad4813ad0852f65fa9cda7de52e1bf610db6ace5e39aa077b

Contents?: true

Size: 655 Bytes

Versions: 1

Compression:

Stored size: 655 Bytes

Contents

# encoding: utf-8

module Backup
  class Packager
    include Backup::CLI::Helpers

    ##
    # Holds an instance of the current Backup model
    attr_accessor :model

    ##
    # Creates a new instance of the Backup::Packager class
    def initialize(model)
      @model = model
    end

    ##
    # Packages the current state of the backup in to a single archived file.
    def package!
      Logger.message "#{ self.class } started packaging the backup files."
      run("#{ utility(:tar) } -c -f '#{ File.join(Backup::TMP_PATH, "#{ Backup::TIME }.#{ Backup::TRIGGER }.tar") }' -C '#{ Backup::TMP_PATH }' '#{ Backup::TRIGGER }'")
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backup-3.0.20 lib/backup/packager.rb