Method: Backup::Utilities.configure
- Defined in:
- lib/backup/utilities.rb
.configure(&block) ⇒ Object
Configure the path to system utilities used by Backup.
Backup will attempt to locate any required system utilities using a which command call. If a utility can not be found, or you need to specify an alternate path for a utility, you may do so in your config.rb file using this method.
Backup supports both GNU and BSD utilities. While Backup uses these utilities in a manner compatible with either version, the tar utility requires some special handling with respect to Archives. Backup will attempt to detect if the tar command found (or set here) is GNU or BSD. If for some reason this fails, this may be set using the tar_dist command shown below.
Backup::Utilities.configure do
# General Utilites
tar '/path/to/tar'
tar_dist :gnu # or :bsd
cat '/path/to/cat'
split '/path/to/split'
sudo '/path/to/sudo'
chown '/path/to/chown'
hostname '/path/to/hostname'
# Compressors
gzip '/path/to/gzip'
bzip2 '/path/to/bzip2'
# Database Utilities
mongo '/path/to/mongo'
mongodump '/path/to/mongodump'
mysqldump '/path/to/mysqldump'
pg_dump '/path/to/pg_dump'
pg_dumpall '/path/to/pg_dumpall'
redis_cli '/path/to/redis-cli'
riak_admin '/path/to/riak-admin'
# Encryptors
gpg '/path/to/gpg'
openssl '/path/to/openssl'
# Syncer and Storage
rsync '/path/to/rsync'
ssh '/path/to/ssh'
# Notifiers
sendmail '/path/to/sendmail'
exim '/path/to/exim'
send_nsca '/path/to/send_nsca'
zabbix_sender '/path/to/zabbix_sender'
end
These paths may be set using absolute paths, or relative to the working directory when Backup is run.
104 105 106 |
# File 'lib/backup/utilities.rb', line 104 def configure(&block) DSL.instance_eval(&block) end |