backup-agoddard 3.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +8 -0
- data/.travis.yml +10 -0
- data/Gemfile +28 -0
- data/Guardfile +23 -0
- data/LICENSE.md +24 -0
- data/README.md +478 -0
- data/backup.gemspec +32 -0
- data/bin/backup +11 -0
- data/lib/backup.rb +133 -0
- data/lib/backup/archive.rb +117 -0
- data/lib/backup/binder.rb +22 -0
- data/lib/backup/cleaner.rb +121 -0
- data/lib/backup/cli/helpers.rb +93 -0
- data/lib/backup/cli/utility.rb +255 -0
- data/lib/backup/compressor/base.rb +35 -0
- data/lib/backup/compressor/bzip2.rb +50 -0
- data/lib/backup/compressor/custom.rb +53 -0
- data/lib/backup/compressor/gzip.rb +50 -0
- data/lib/backup/compressor/lzma.rb +52 -0
- data/lib/backup/compressor/pbzip2.rb +59 -0
- data/lib/backup/config.rb +174 -0
- data/lib/backup/configuration.rb +33 -0
- data/lib/backup/configuration/helpers.rb +130 -0
- data/lib/backup/configuration/store.rb +24 -0
- data/lib/backup/database/base.rb +53 -0
- data/lib/backup/database/mongodb.rb +230 -0
- data/lib/backup/database/mysql.rb +160 -0
- data/lib/backup/database/postgresql.rb +144 -0
- data/lib/backup/database/redis.rb +136 -0
- data/lib/backup/database/riak.rb +67 -0
- data/lib/backup/dependency.rb +108 -0
- data/lib/backup/encryptor/base.rb +29 -0
- data/lib/backup/encryptor/gpg.rb +760 -0
- data/lib/backup/encryptor/open_ssl.rb +72 -0
- data/lib/backup/errors.rb +124 -0
- data/lib/backup/hooks.rb +68 -0
- data/lib/backup/logger.rb +152 -0
- data/lib/backup/model.rb +409 -0
- data/lib/backup/notifier/base.rb +81 -0
- data/lib/backup/notifier/campfire.rb +155 -0
- data/lib/backup/notifier/hipchat.rb +93 -0
- data/lib/backup/notifier/mail.rb +206 -0
- data/lib/backup/notifier/prowl.rb +65 -0
- data/lib/backup/notifier/pushover.rb +88 -0
- data/lib/backup/notifier/twitter.rb +70 -0
- data/lib/backup/package.rb +47 -0
- data/lib/backup/packager.rb +100 -0
- data/lib/backup/pipeline.rb +110 -0
- data/lib/backup/splitter.rb +75 -0
- data/lib/backup/storage/base.rb +99 -0
- data/lib/backup/storage/cloudfiles.rb +87 -0
- data/lib/backup/storage/cycler.rb +117 -0
- data/lib/backup/storage/dropbox.rb +178 -0
- data/lib/backup/storage/ftp.rb +119 -0
- data/lib/backup/storage/local.rb +82 -0
- data/lib/backup/storage/ninefold.rb +116 -0
- data/lib/backup/storage/rsync.rb +149 -0
- data/lib/backup/storage/s3.rb +94 -0
- data/lib/backup/storage/scp.rb +99 -0
- data/lib/backup/storage/sftp.rb +108 -0
- data/lib/backup/syncer/base.rb +46 -0
- data/lib/backup/syncer/cloud/base.rb +247 -0
- data/lib/backup/syncer/cloud/cloud_files.rb +78 -0
- data/lib/backup/syncer/cloud/s3.rb +68 -0
- data/lib/backup/syncer/rsync/base.rb +49 -0
- data/lib/backup/syncer/rsync/local.rb +55 -0
- data/lib/backup/syncer/rsync/pull.rb +36 -0
- data/lib/backup/syncer/rsync/push.rb +116 -0
- data/lib/backup/template.rb +46 -0
- data/lib/backup/version.rb +43 -0
- data/spec-live/.gitignore +6 -0
- data/spec-live/README +7 -0
- data/spec-live/backups/config.rb +83 -0
- data/spec-live/backups/config.yml.template +46 -0
- data/spec-live/backups/models.rb +184 -0
- data/spec-live/compressor/custom_spec.rb +30 -0
- data/spec-live/compressor/gzip_spec.rb +30 -0
- data/spec-live/encryptor/gpg_keys.rb +239 -0
- data/spec-live/encryptor/gpg_spec.rb +287 -0
- data/spec-live/notifier/mail_spec.rb +121 -0
- data/spec-live/spec_helper.rb +151 -0
- data/spec-live/storage/dropbox_spec.rb +151 -0
- data/spec-live/storage/local_spec.rb +83 -0
- data/spec-live/storage/scp_spec.rb +193 -0
- data/spec-live/syncer/cloud/s3_spec.rb +124 -0
- data/spec/archive_spec.rb +335 -0
- data/spec/cleaner_spec.rb +312 -0
- data/spec/cli/helpers_spec.rb +301 -0
- data/spec/cli/utility_spec.rb +411 -0
- data/spec/compressor/base_spec.rb +52 -0
- data/spec/compressor/bzip2_spec.rb +217 -0
- data/spec/compressor/custom_spec.rb +106 -0
- data/spec/compressor/gzip_spec.rb +217 -0
- data/spec/compressor/lzma_spec.rb +123 -0
- data/spec/compressor/pbzip2_spec.rb +165 -0
- data/spec/config_spec.rb +321 -0
- data/spec/configuration/helpers_spec.rb +247 -0
- data/spec/configuration/store_spec.rb +39 -0
- data/spec/configuration_spec.rb +62 -0
- data/spec/database/base_spec.rb +63 -0
- data/spec/database/mongodb_spec.rb +510 -0
- data/spec/database/mysql_spec.rb +411 -0
- data/spec/database/postgresql_spec.rb +353 -0
- data/spec/database/redis_spec.rb +334 -0
- data/spec/database/riak_spec.rb +176 -0
- data/spec/dependency_spec.rb +51 -0
- data/spec/encryptor/base_spec.rb +40 -0
- data/spec/encryptor/gpg_spec.rb +909 -0
- data/spec/encryptor/open_ssl_spec.rb +148 -0
- data/spec/errors_spec.rb +306 -0
- data/spec/hooks_spec.rb +35 -0
- data/spec/logger_spec.rb +367 -0
- data/spec/model_spec.rb +694 -0
- data/spec/notifier/base_spec.rb +104 -0
- data/spec/notifier/campfire_spec.rb +217 -0
- data/spec/notifier/hipchat_spec.rb +211 -0
- data/spec/notifier/mail_spec.rb +316 -0
- data/spec/notifier/prowl_spec.rb +138 -0
- data/spec/notifier/pushover_spec.rb +123 -0
- data/spec/notifier/twitter_spec.rb +153 -0
- data/spec/package_spec.rb +61 -0
- data/spec/packager_spec.rb +213 -0
- data/spec/pipeline_spec.rb +259 -0
- data/spec/spec_helper.rb +60 -0
- data/spec/splitter_spec.rb +120 -0
- data/spec/storage/base_spec.rb +166 -0
- data/spec/storage/cloudfiles_spec.rb +254 -0
- data/spec/storage/cycler_spec.rb +247 -0
- data/spec/storage/dropbox_spec.rb +480 -0
- data/spec/storage/ftp_spec.rb +271 -0
- data/spec/storage/local_spec.rb +259 -0
- data/spec/storage/ninefold_spec.rb +343 -0
- data/spec/storage/rsync_spec.rb +362 -0
- data/spec/storage/s3_spec.rb +245 -0
- data/spec/storage/scp_spec.rb +233 -0
- data/spec/storage/sftp_spec.rb +244 -0
- data/spec/syncer/base_spec.rb +109 -0
- data/spec/syncer/cloud/base_spec.rb +515 -0
- data/spec/syncer/cloud/cloud_files_spec.rb +181 -0
- data/spec/syncer/cloud/s3_spec.rb +174 -0
- data/spec/syncer/rsync/base_spec.rb +98 -0
- data/spec/syncer/rsync/local_spec.rb +149 -0
- data/spec/syncer/rsync/pull_spec.rb +98 -0
- data/spec/syncer/rsync/push_spec.rb +333 -0
- data/spec/version_spec.rb +21 -0
- data/templates/cli/utility/archive +25 -0
- data/templates/cli/utility/compressor/bzip2 +4 -0
- data/templates/cli/utility/compressor/custom +11 -0
- data/templates/cli/utility/compressor/gzip +4 -0
- data/templates/cli/utility/compressor/lzma +10 -0
- data/templates/cli/utility/compressor/pbzip2 +10 -0
- data/templates/cli/utility/config +32 -0
- data/templates/cli/utility/database/mongodb +18 -0
- data/templates/cli/utility/database/mysql +21 -0
- data/templates/cli/utility/database/postgresql +17 -0
- data/templates/cli/utility/database/redis +16 -0
- data/templates/cli/utility/database/riak +11 -0
- data/templates/cli/utility/encryptor/gpg +27 -0
- data/templates/cli/utility/encryptor/openssl +9 -0
- data/templates/cli/utility/model.erb +23 -0
- data/templates/cli/utility/notifier/campfire +12 -0
- data/templates/cli/utility/notifier/hipchat +15 -0
- data/templates/cli/utility/notifier/mail +22 -0
- data/templates/cli/utility/notifier/prowl +11 -0
- data/templates/cli/utility/notifier/pushover +11 -0
- data/templates/cli/utility/notifier/twitter +13 -0
- data/templates/cli/utility/splitter +7 -0
- data/templates/cli/utility/storage/cloud_files +22 -0
- data/templates/cli/utility/storage/dropbox +20 -0
- data/templates/cli/utility/storage/ftp +12 -0
- data/templates/cli/utility/storage/local +7 -0
- data/templates/cli/utility/storage/ninefold +9 -0
- data/templates/cli/utility/storage/rsync +11 -0
- data/templates/cli/utility/storage/s3 +19 -0
- data/templates/cli/utility/storage/scp +11 -0
- data/templates/cli/utility/storage/sftp +11 -0
- data/templates/cli/utility/syncer/cloud_files +46 -0
- data/templates/cli/utility/syncer/rsync_local +12 -0
- data/templates/cli/utility/syncer/rsync_pull +17 -0
- data/templates/cli/utility/syncer/rsync_push +17 -0
- data/templates/cli/utility/syncer/s3 +43 -0
- data/templates/general/links +11 -0
- data/templates/general/version.erb +2 -0
- data/templates/notifier/mail/failure.erb +9 -0
- data/templates/notifier/mail/success.erb +7 -0
- data/templates/notifier/mail/warning.erb +9 -0
- data/templates/storage/dropbox/authorization_url.erb +6 -0
- data/templates/storage/dropbox/authorized.erb +4 -0
- data/templates/storage/dropbox/cache_file_written.erb +10 -0
- metadata +277 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require File.expand_path('../spec_helper.rb', __FILE__)
|
|
4
|
+
|
|
5
|
+
def set_version(major, minor, patch)
|
|
6
|
+
Backup::Version.stubs(:major).returns(major)
|
|
7
|
+
Backup::Version.stubs(:minor).returns(minor)
|
|
8
|
+
Backup::Version.stubs(:patch).returns(patch)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
describe Backup::Version do
|
|
12
|
+
it 'should return a nicer gemspec output' do
|
|
13
|
+
set_version(1,2,3)
|
|
14
|
+
Backup::Version.current.should == '1.2.3'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'should return a nicer gemspec output with build' do
|
|
18
|
+
set_version(4,5,6)
|
|
19
|
+
Backup::Version.current.should == '4.5.6'
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Archive [Archive]
|
|
3
|
+
#
|
|
4
|
+
# Adding a file:
|
|
5
|
+
#
|
|
6
|
+
# archive.add "/path/to/a/file.rb"
|
|
7
|
+
#
|
|
8
|
+
# Adding an directory (including sub-directories):
|
|
9
|
+
#
|
|
10
|
+
# archive.add "/path/to/a/directory/"
|
|
11
|
+
#
|
|
12
|
+
# Excluding a file:
|
|
13
|
+
#
|
|
14
|
+
# archive.exclude "/path/to/an/excluded_file.rb"
|
|
15
|
+
#
|
|
16
|
+
# Excluding a directory (including sub-directories):
|
|
17
|
+
#
|
|
18
|
+
# archive.exclude "/path/to/an/excluded_directory/
|
|
19
|
+
#
|
|
20
|
+
archive :my_archive do |archive|
|
|
21
|
+
archive.add "/path/to/a/file.rb"
|
|
22
|
+
archive.add "/path/to/a/folder/"
|
|
23
|
+
archive.exclude "/path/to/a/excluded_file.rb"
|
|
24
|
+
archive.exclude "/path/to/a/excluded_folder/"
|
|
25
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Custom [Compressor]
|
|
3
|
+
#
|
|
4
|
+
# For information on using a Custom Compressor,
|
|
5
|
+
# please see the following Wiki page:
|
|
6
|
+
# https://github.com/meskyanichi/backup/wiki/Compressors
|
|
7
|
+
#
|
|
8
|
+
compress_with Custom do |compressor|
|
|
9
|
+
compressor.command = 'gzip'
|
|
10
|
+
compressor.extension = '.gz'
|
|
11
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
##
|
|
4
|
+
# Backup
|
|
5
|
+
# Generated Main Config Template
|
|
6
|
+
#
|
|
7
|
+
# For more information:
|
|
8
|
+
#
|
|
9
|
+
# View the Git repository at https://github.com/meskyanichi/backup
|
|
10
|
+
# View the Wiki/Documentation at https://github.com/meskyanichi/backup/wiki
|
|
11
|
+
# View the issue log at https://github.com/meskyanichi/backup/issues
|
|
12
|
+
|
|
13
|
+
##
|
|
14
|
+
# Global Configuration
|
|
15
|
+
# Add more (or remove) global configuration below
|
|
16
|
+
#
|
|
17
|
+
# Backup::Storage::S3.defaults do |s3|
|
|
18
|
+
# s3.access_key_id = "my_access_key_id"
|
|
19
|
+
# s3.secret_access_key = "my_secret_access_key"
|
|
20
|
+
# end
|
|
21
|
+
#
|
|
22
|
+
# Backup::Encryptor::OpenSSL.defaults do |encryption|
|
|
23
|
+
# encryption.password = "my_password"
|
|
24
|
+
# encryption.base64 = true
|
|
25
|
+
# encryption.salt = true
|
|
26
|
+
# end
|
|
27
|
+
|
|
28
|
+
##
|
|
29
|
+
# Load all models from the models directory (after the above global configuration blocks)
|
|
30
|
+
Dir[File.join(File.dirname(Config.config_file), "models", "*.rb")].each do |model|
|
|
31
|
+
instance_eval(File.read(model))
|
|
32
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
##
|
|
2
|
+
# MongoDB [Database]
|
|
3
|
+
#
|
|
4
|
+
database MongoDB do |db|
|
|
5
|
+
db.name = "my_database_name"
|
|
6
|
+
db.username = "my_username"
|
|
7
|
+
db.password = "my_password"
|
|
8
|
+
db.host = "localhost"
|
|
9
|
+
db.port = 5432
|
|
10
|
+
db.ipv6 = false
|
|
11
|
+
db.only_collections = ["only", "these" "collections"]
|
|
12
|
+
db.additional_options = []
|
|
13
|
+
db.lock = false
|
|
14
|
+
# Optional: Use to set the location of these utilities
|
|
15
|
+
# if they cannot be found by their name in your $PATH
|
|
16
|
+
# db.mongodump_utility = "/opt/local/bin/mongodump"
|
|
17
|
+
# db.mongo_utility = "/opt/local/bin/mongo"
|
|
18
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
##
|
|
2
|
+
# MySQL [Database]
|
|
3
|
+
#
|
|
4
|
+
database MySQL do |db|
|
|
5
|
+
# To dump all databases, set `db.name = :all` (or leave blank)
|
|
6
|
+
db.name = "my_database_name"
|
|
7
|
+
db.username = "my_username"
|
|
8
|
+
db.password = "my_password"
|
|
9
|
+
db.host = "localhost"
|
|
10
|
+
db.port = 3306
|
|
11
|
+
db.socket = "/tmp/mysql.sock"
|
|
12
|
+
# Note: when using `skip_tables` with the `db.name = :all` option,
|
|
13
|
+
# table names should be prefixed with a database name.
|
|
14
|
+
# e.g. ["db_name.table_to_skip", ...]
|
|
15
|
+
db.skip_tables = ["skip", "these", "tables"]
|
|
16
|
+
db.only_tables = ["only", "these" "tables"]
|
|
17
|
+
db.additional_options = ["--quick", "--single-transaction"]
|
|
18
|
+
# Optional: Use to set the location of this utility
|
|
19
|
+
# if it cannot be found by name in your $PATH
|
|
20
|
+
# db.mysqldump_utility = "/opt/local/bin/mysqldump"
|
|
21
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
##
|
|
2
|
+
# PostgreSQL [Database]
|
|
3
|
+
#
|
|
4
|
+
database PostgreSQL do |db|
|
|
5
|
+
db.name = "my_database_name"
|
|
6
|
+
db.username = "my_username"
|
|
7
|
+
db.password = "my_password"
|
|
8
|
+
db.host = "localhost"
|
|
9
|
+
db.port = 5432
|
|
10
|
+
db.socket = "/tmp/pg.sock"
|
|
11
|
+
db.skip_tables = ["skip", "these", "tables"]
|
|
12
|
+
db.only_tables = ["only", "these" "tables"]
|
|
13
|
+
db.additional_options = ["-xc", "-E=utf8"]
|
|
14
|
+
# Optional: Use to set the location of this utility
|
|
15
|
+
# if it cannot be found by name in your $PATH
|
|
16
|
+
# db.pg_dump_utility = "/opt/local/bin/pg_dump"
|
|
17
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Redis [Database]
|
|
3
|
+
#
|
|
4
|
+
database Redis do |db|
|
|
5
|
+
db.name = "my_database_name"
|
|
6
|
+
db.path = "/usr/local/var/db/redis"
|
|
7
|
+
db.password = "my_password"
|
|
8
|
+
db.host = "localhost"
|
|
9
|
+
db.port = 5432
|
|
10
|
+
db.socket = "/tmp/redis.sock"
|
|
11
|
+
db.additional_options = []
|
|
12
|
+
db.invoke_save = true
|
|
13
|
+
# Optional: Use to set the location of this utility
|
|
14
|
+
# if it cannot be found by name in your $PATH
|
|
15
|
+
# db.redis_cli_utility = "/opt/local/bin/redis-cli"
|
|
16
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Riak [Database]
|
|
3
|
+
#
|
|
4
|
+
database Riak do |db|
|
|
5
|
+
db.name = "hostname"
|
|
6
|
+
db.node = "riak@hostname"
|
|
7
|
+
db.cookie = "cookie"
|
|
8
|
+
# Optional: Use to set the location of this utility
|
|
9
|
+
# if it cannot be found by name in your $PATH
|
|
10
|
+
# db.riak_admin_utility = '/opt/local/bin/riak-admin'
|
|
11
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
##
|
|
2
|
+
# GPG [Encryptor]
|
|
3
|
+
#
|
|
4
|
+
# Setting up #keys, as well as #gpg_homedir and #gpg_config,
|
|
5
|
+
# would be best set in config.rb using Encryptor::GPG.defaults
|
|
6
|
+
#
|
|
7
|
+
encrypt_with GPG do |encryption|
|
|
8
|
+
# Setup public keys for #recipients
|
|
9
|
+
encryption.keys = {}
|
|
10
|
+
encryption.keys['user@domain.com'] = <<-KEY
|
|
11
|
+
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
12
|
+
Version: GnuPG v1.4.11 (Darwin)
|
|
13
|
+
|
|
14
|
+
<Your GPG Public Key Here>
|
|
15
|
+
-----END PGP PUBLIC KEY BLOCK-----
|
|
16
|
+
KEY
|
|
17
|
+
|
|
18
|
+
# Specify mode (:asymmetric, :symmetric or :both)
|
|
19
|
+
encryption.mode = :both # defaults to :asymmetric
|
|
20
|
+
|
|
21
|
+
# Specify recipients from #keys (for :asymmetric encryption)
|
|
22
|
+
encryption.recipients = ['user@domain.com']
|
|
23
|
+
|
|
24
|
+
# Specify passphrase or passphrase_file (for :symmetric encryption)
|
|
25
|
+
encryption.passphrase = 'a secret'
|
|
26
|
+
# encryption.passphrase_file = '~/backup_passphrase'
|
|
27
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
##
|
|
4
|
+
# Backup Generated: <%= @options[:trigger] %>
|
|
5
|
+
# Once configured, you can run the backup with the following command:
|
|
6
|
+
#
|
|
7
|
+
# $ backup perform -t <%= @options[:trigger] %> [-c <path_to_configuration_file>]
|
|
8
|
+
#
|
|
9
|
+
Backup::Model.new(:<%= @options[:trigger] %>, 'Description for <%= @options[:trigger] %>') do
|
|
10
|
+
<% if @options[:splitter] %>
|
|
11
|
+
<%= Backup::Template.new.result("cli/utility/splitter") %>
|
|
12
|
+
<% end; if @options[:archives] %>
|
|
13
|
+
<%= Backup::Template.new.result("cli/utility/archive") %>
|
|
14
|
+
<% end; [:databases, :storages, :syncers, :encryptors, :compressors, :notifiers].each do |item|
|
|
15
|
+
if @options[item]
|
|
16
|
+
@options[item].split(',').map(&:strip).uniq.each do |entry|
|
|
17
|
+
if File.exist?(File.join(Backup::TEMPLATE_PATH, 'cli', 'utility', item.to_s[0..-2], entry)) %>
|
|
18
|
+
<%= Backup::Template.new.result("cli/utility/#{item.to_s[0..-2]}/#{entry}") %>
|
|
19
|
+
<% end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end %>
|
|
23
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Campfire [Notifier]
|
|
3
|
+
#
|
|
4
|
+
notify_by Campfire do |campfire|
|
|
5
|
+
campfire.on_success = true
|
|
6
|
+
campfire.on_warning = true
|
|
7
|
+
campfire.on_failure = true
|
|
8
|
+
|
|
9
|
+
campfire.api_token = "my_api_authentication_token"
|
|
10
|
+
campfire.subdomain = "my_subdomain"
|
|
11
|
+
campfire.room_id = "my_room_id"
|
|
12
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Hipchat [Notifier]
|
|
3
|
+
#
|
|
4
|
+
notify_by Hipchat do |hipchat|
|
|
5
|
+
hipchat.on_success = true
|
|
6
|
+
hipchat.on_warning = true
|
|
7
|
+
hipchat.on_failure = true
|
|
8
|
+
|
|
9
|
+
hipchat.token = "token"
|
|
10
|
+
hipchat.from = "DB Backup"
|
|
11
|
+
hipchat.rooms_notified = ["activity"]
|
|
12
|
+
hipchat.success_color = "green"
|
|
13
|
+
hipchat.warning_color = "yellow"
|
|
14
|
+
hipchat.failure_color = "red"
|
|
15
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Mail [Notifier]
|
|
3
|
+
#
|
|
4
|
+
# The default delivery method for Mail Notifiers is 'SMTP'.
|
|
5
|
+
# See the Wiki for other delivery options.
|
|
6
|
+
# https://github.com/meskyanichi/backup/wiki/Notifiers
|
|
7
|
+
#
|
|
8
|
+
notify_by Mail do |mail|
|
|
9
|
+
mail.on_success = true
|
|
10
|
+
mail.on_warning = true
|
|
11
|
+
mail.on_failure = true
|
|
12
|
+
|
|
13
|
+
mail.from = "sender@email.com"
|
|
14
|
+
mail.to = "receiver@email.com"
|
|
15
|
+
mail.address = "smtp.gmail.com"
|
|
16
|
+
mail.port = 587
|
|
17
|
+
mail.domain = "your.host.name"
|
|
18
|
+
mail.user_name = "sender@email.com"
|
|
19
|
+
mail.password = "my_password"
|
|
20
|
+
mail.authentication = "plain"
|
|
21
|
+
mail.enable_starttls_auto = true
|
|
22
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Twitter [Notifier]
|
|
3
|
+
#
|
|
4
|
+
notify_by Twitter do |tweet|
|
|
5
|
+
tweet.on_success = true
|
|
6
|
+
tweet.on_warning = true
|
|
7
|
+
tweet.on_failure = true
|
|
8
|
+
|
|
9
|
+
tweet.consumer_key = "my_consumer_key"
|
|
10
|
+
tweet.consumer_secret = "my_consumer_secret"
|
|
11
|
+
tweet.oauth_token = "my_oauth_token"
|
|
12
|
+
tweet.oauth_token_secret = "my_oauth_token_secret"
|
|
13
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Rackspace Cloud Files [Storage]
|
|
3
|
+
#
|
|
4
|
+
# Available Auth URLs:
|
|
5
|
+
#
|
|
6
|
+
# - https://auth.api.rackspacecloud.com (US - Default)
|
|
7
|
+
# - https://lon.auth.api.rackspacecloud.com (UK)
|
|
8
|
+
#
|
|
9
|
+
# Servicenet:
|
|
10
|
+
#
|
|
11
|
+
# Set this to 'true' if Backup runs on a Rackspace server. It will avoid
|
|
12
|
+
# transfer charges and it's more performant.
|
|
13
|
+
#
|
|
14
|
+
store_with CloudFiles do |cf|
|
|
15
|
+
cf.api_key = "my_api_key"
|
|
16
|
+
cf.username = "my_username"
|
|
17
|
+
cf.container = "my_container"
|
|
18
|
+
cf.path = "/path/to/my/backups"
|
|
19
|
+
cf.keep = 5
|
|
20
|
+
cf.auth_url = "lon.auth.api.rackspacecloud.com"
|
|
21
|
+
cf.servicenet = false
|
|
22
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Dropbox File Hosting Service [Storage]
|
|
3
|
+
#
|
|
4
|
+
# Access Type:
|
|
5
|
+
#
|
|
6
|
+
# - :app_folder (Default)
|
|
7
|
+
# - :dropbox
|
|
8
|
+
#
|
|
9
|
+
# Note:
|
|
10
|
+
#
|
|
11
|
+
# Initial backup must be performed manually to authorize
|
|
12
|
+
# this machine with your Dropbox account.
|
|
13
|
+
#
|
|
14
|
+
store_with Dropbox do |db|
|
|
15
|
+
db.api_key = "my_api_key"
|
|
16
|
+
db.api_secret = "my_api_secret"
|
|
17
|
+
db.access_type = :app_folder
|
|
18
|
+
db.path = "/path/to/my/backups"
|
|
19
|
+
db.keep = 25
|
|
20
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
##
|
|
2
|
+
# FTP (File Transfer Protocol) [Storage]
|
|
3
|
+
#
|
|
4
|
+
store_with FTP do |server|
|
|
5
|
+
server.username = "my_username"
|
|
6
|
+
server.password = "my_password"
|
|
7
|
+
server.ip = "123.45.678.90"
|
|
8
|
+
server.port = 21
|
|
9
|
+
server.path = "~/backups/"
|
|
10
|
+
server.keep = 5
|
|
11
|
+
server.passive_mode = false
|
|
12
|
+
end
|