Sha256: 023ed6e2d7678b5e0ffd47524bdcd28fdb031837732554e9be0b7df82c15ae53

Contents?: true

Size: 876 Bytes

Versions: 24

Compression:

Stored size: 876 Bytes

Contents

# encoding: utf-8

module Backup
  module Database
    class Base
      include Backup::CLI
      include Backup::Configuration::Helpers

      ##
      # Contains the path to where the database should be dumped
      attr_accessor :dump_path

      ##
      # Allows the user to specify the path to a "dump" utility
      # in case it cannot be auto-detected by Backup
      attr_accessor :utility_path

      ##
      # Defines the @dump_path and ensures it exists by creating it
      def prepare!
        @dump_path = File.join(TMP_PATH, TRIGGER, self.class.name.split('::').last)
        mkdir(dump_path)
      end

      ##
      # Logs a message to the console and log file to inform
      # the client that Backup is dumping the database
      def log!
        Logger.message("#{ self.class } started dumping and archiving \"#{ name }\".")
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
backup-3.0.19 lib/backup/database/base.rb
backup-3.0.18 lib/backup/database/base.rb
interu-backup-3.0.16 lib/backup/database/base.rb
backup-3.0.16 lib/backup/database/base.rb
backup-3.0.15 lib/backup/database/base.rb
backup-3.0.14 lib/backup/database/base.rb
backup-3.0.13 lib/backup/database/base.rb
backup-3.0.12 lib/backup/database/base.rb
backup-3.0.11 lib/backup/database/base.rb
alg-backup-3.0.10 lib/backup/database/base.rb
backup-3.0.10 lib/backup/database/base.rb
backup-3.0.9 lib/backup/database/base.rb
backup-3.0.8 lib/backup/database/base.rb
backup-3.0.7 lib/backup/database/base.rb
backup-3.0.6 lib/backup/database/base.rb
backup-3.0.5 lib/backup/database/base.rb
backup-3.0.4 lib/backup/database/base.rb
backup-3.0.3 lib/backup/database/base.rb
backup-3.0.2.build.0 lib/backup/database/base.rb
backup-3.0.2 lib/backup/database/base.rb