Module: Backup

Defined in:
lib/backup.rb,
lib/backup/hooks.rb,
lib/backup/model.rb,
lib/backup/binder.rb,
lib/backup/config.rb,
lib/backup/errors.rb,
lib/backup/logger.rb,
lib/backup/archive.rb,
lib/backup/cleaner.rb,
lib/backup/package.rb,
lib/backup/version.rb,
lib/backup/packager.rb,
lib/backup/pipeline.rb,
lib/backup/splitter.rb,
lib/backup/template.rb,
lib/backup/dependency.rb,
lib/backup/storage/s3.rb,
lib/backup/cli/helpers.rb,
lib/backup/cli/utility.rb,
lib/backup/storage/ftp.rb,
lib/backup/storage/scp.rb,
lib/backup/syncer/base.rb,
lib/backup/storage/base.rb,
lib/backup/storage/sftp.rb,
lib/backup/configuration.rb,
lib/backup/database/base.rb,
lib/backup/database/riak.rb,
lib/backup/encryptor/gpg.rb,
lib/backup/notifier/base.rb,
lib/backup/notifier/mail.rb,
lib/backup/storage/local.rb,
lib/backup/storage/rsync.rb,
lib/backup/database/mysql.rb,
lib/backup/database/redis.rb,
lib/backup/encryptor/base.rb,
lib/backup/notifier/prowl.rb,
lib/backup/storage/cycler.rb,
lib/backup/compressor/base.rb,
lib/backup/compressor/gzip.rb,
lib/backup/compressor/lzma.rb,
lib/backup/storage/dropbox.rb,
lib/backup/syncer/cloud/s3.rb,
lib/backup/compressor/bzip2.rb,
lib/backup/database/mongodb.rb,
lib/backup/notifier/hipchat.rb,
lib/backup/notifier/twitter.rb,
lib/backup/storage/ninefold.rb,
lib/backup/compressor/custom.rb,
lib/backup/compressor/pbzip2.rb,
lib/backup/notifier/campfire.rb,
lib/backup/notifier/pushover.rb,
lib/backup/syncer/cloud/base.rb,
lib/backup/syncer/rsync/base.rb,
lib/backup/syncer/rsync/pull.rb,
lib/backup/syncer/rsync/push.rb,
lib/backup/encryptor/open_ssl.rb,
lib/backup/storage/cloudfiles.rb,
lib/backup/syncer/rsync/local.rb,
lib/backup/configuration/store.rb,
lib/backup/database/postgresql.rb,
lib/backup/configuration/helpers.rb,
lib/backup/syncer/cloud/cloud_files.rb

Overview

Temporary measure for deprecating the use of Configuration namespaced classes for setting pre-configured defaults.

Defined Under Namespace

Modules: CLI, Cleaner, Compressor, Config, Configuration, Database, Encryptor, Errors, ErrorsHelper, Logger, Notifier, Packager, Storage, Syncer Classes: Archive, Binder, Dependency, Hooks, Model, Package, Pipeline, Splitter, Template, Version

Constant Summary collapse

LIBRARY_PATH =

Backup’s internal paths

File.join(File.dirname(__FILE__), 'backup')
CLI_PATH =
File.join(LIBRARY_PATH, 'cli')
STORAGE_PATH =
File.join(LIBRARY_PATH, 'storage')
DATABASE_PATH =
File.join(LIBRARY_PATH, 'database')
COMPRESSOR_PATH =
File.join(LIBRARY_PATH, 'compressor')
ENCRYPTOR_PATH =
File.join(LIBRARY_PATH, 'encryptor')
NOTIFIER_PATH =
File.join(LIBRARY_PATH, 'notifier')
SYNCER_PATH =
File.join(LIBRARY_PATH, 'syncer')
TEMPLATE_PATH =
File.expand_path('../../templates', __FILE__)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.const_missing(const) ⇒ Object



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/backup/config.rb', line 155

def const_missing(const)
  if const.to_s == 'CONFIG_FILE'
    Logger.warn Errors::ConfigError.new(<<-EOS)
      Configuration File Upgrade Needed
      Your configuration file, located at #{ Config.config_file }
      needs to be upgraded for this version of Backup.
      The reference to 'Backup::CONFIG_FILE' in your current config.rb file
      has been deprecated and needs to be replaced with 'Config.config_file'.
      You may update this reference in your config.rb manually,
      or generate a new config.rb using 'backup generate:config'.
      * Note: if you have global configuration defaults set in config.rb,
      be sure to transfer them to your new config.rb, should you choose
      to generate a new config.rb file.
    EOS
    return Config.config_file
  end
  super
end

Instance Method Details

#libObject

Require Backup base files



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/backup.rb', line 114

%w{
  archive
  binder
  cleaner
  config
  configuration
  dependency
  errors
  hooks
  logger
  model
  package
  packager
  pipeline
  splitter
  template
  version
}.each {|lib| require File.join(LIBRARY_PATH, lib) }