backup_checksum 3.0.23
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of backup_checksum might be problematic. Click here for more details.
- data/.gitignore +7 -0
- data/.travis.yml +10 -0
- data/Gemfile +28 -0
- data/Gemfile.lock +130 -0
- data/Guardfile +21 -0
- data/LICENSE.md +24 -0
- data/README.md +476 -0
- data/backup_checksum.gemspec +32 -0
- data/bin/backup +11 -0
- data/lib/backup.rb +217 -0
- data/lib/backup/archive.rb +117 -0
- data/lib/backup/binder.rb +22 -0
- data/lib/backup/checksum/base.rb +44 -0
- data/lib/backup/checksum/shasum.rb +16 -0
- data/lib/backup/cleaner.rb +121 -0
- data/lib/backup/cli/helpers.rb +88 -0
- data/lib/backup/cli/utility.rb +247 -0
- data/lib/backup/compressor/base.rb +29 -0
- data/lib/backup/compressor/bzip2.rb +50 -0
- data/lib/backup/compressor/gzip.rb +47 -0
- data/lib/backup/compressor/lzma.rb +50 -0
- data/lib/backup/compressor/pbzip2.rb +56 -0
- data/lib/backup/config.rb +173 -0
- data/lib/backup/configuration/base.rb +15 -0
- data/lib/backup/configuration/checksum/base.rb +9 -0
- data/lib/backup/configuration/checksum/shasum.rb +9 -0
- data/lib/backup/configuration/compressor/base.rb +9 -0
- data/lib/backup/configuration/compressor/bzip2.rb +23 -0
- data/lib/backup/configuration/compressor/gzip.rb +23 -0
- data/lib/backup/configuration/compressor/lzma.rb +23 -0
- data/lib/backup/configuration/compressor/pbzip2.rb +28 -0
- data/lib/backup/configuration/database/base.rb +19 -0
- data/lib/backup/configuration/database/mongodb.rb +49 -0
- data/lib/backup/configuration/database/mysql.rb +42 -0
- data/lib/backup/configuration/database/postgresql.rb +41 -0
- data/lib/backup/configuration/database/redis.rb +39 -0
- data/lib/backup/configuration/database/riak.rb +29 -0
- data/lib/backup/configuration/encryptor/base.rb +9 -0
- data/lib/backup/configuration/encryptor/gpg.rb +17 -0
- data/lib/backup/configuration/encryptor/open_ssl.rb +32 -0
- data/lib/backup/configuration/helpers.rb +52 -0
- data/lib/backup/configuration/notifier/base.rb +28 -0
- data/lib/backup/configuration/notifier/campfire.rb +25 -0
- data/lib/backup/configuration/notifier/hipchat.rb +41 -0
- data/lib/backup/configuration/notifier/mail.rb +112 -0
- data/lib/backup/configuration/notifier/presently.rb +25 -0
- data/lib/backup/configuration/notifier/prowl.rb +23 -0
- data/lib/backup/configuration/notifier/twitter.rb +21 -0
- data/lib/backup/configuration/storage/base.rb +18 -0
- data/lib/backup/configuration/storage/cloudfiles.rb +25 -0
- data/lib/backup/configuration/storage/dropbox.rb +58 -0
- data/lib/backup/configuration/storage/ftp.rb +29 -0
- data/lib/backup/configuration/storage/local.rb +17 -0
- data/lib/backup/configuration/storage/ninefold.rb +20 -0
- data/lib/backup/configuration/storage/rsync.rb +29 -0
- data/lib/backup/configuration/storage/s3.rb +25 -0
- data/lib/backup/configuration/storage/scp.rb +25 -0
- data/lib/backup/configuration/storage/sftp.rb +25 -0
- data/lib/backup/configuration/syncer/base.rb +10 -0
- data/lib/backup/configuration/syncer/cloud.rb +23 -0
- data/lib/backup/configuration/syncer/cloud_files.rb +30 -0
- data/lib/backup/configuration/syncer/rsync/base.rb +28 -0
- data/lib/backup/configuration/syncer/rsync/local.rb +11 -0
- data/lib/backup/configuration/syncer/rsync/pull.rb +11 -0
- data/lib/backup/configuration/syncer/rsync/push.rb +31 -0
- data/lib/backup/configuration/syncer/s3.rb +23 -0
- data/lib/backup/database/base.rb +59 -0
- data/lib/backup/database/mongodb.rb +232 -0
- data/lib/backup/database/mysql.rb +163 -0
- data/lib/backup/database/postgresql.rb +146 -0
- data/lib/backup/database/redis.rb +139 -0
- data/lib/backup/database/riak.rb +69 -0
- data/lib/backup/dependency.rb +114 -0
- data/lib/backup/encryptor/base.rb +29 -0
- data/lib/backup/encryptor/gpg.rb +80 -0
- data/lib/backup/encryptor/open_ssl.rb +72 -0
- data/lib/backup/errors.rb +124 -0
- data/lib/backup/logger.rb +152 -0
- data/lib/backup/model.rb +386 -0
- data/lib/backup/notifier/base.rb +81 -0
- data/lib/backup/notifier/campfire.rb +168 -0
- data/lib/backup/notifier/hipchat.rb +99 -0
- data/lib/backup/notifier/mail.rb +206 -0
- data/lib/backup/notifier/presently.rb +88 -0
- data/lib/backup/notifier/prowl.rb +65 -0
- data/lib/backup/notifier/twitter.rb +70 -0
- data/lib/backup/package.rb +51 -0
- data/lib/backup/packager.rb +108 -0
- data/lib/backup/pipeline.rb +107 -0
- data/lib/backup/splitter.rb +75 -0
- data/lib/backup/storage/base.rb +119 -0
- data/lib/backup/storage/cloudfiles.rb +87 -0
- data/lib/backup/storage/cycler.rb +117 -0
- data/lib/backup/storage/dropbox.rb +181 -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 +42 -0
- data/lib/backup/syncer/cloud.rb +190 -0
- data/lib/backup/syncer/cloud_files.rb +56 -0
- data/lib/backup/syncer/rsync/base.rb +52 -0
- data/lib/backup/syncer/rsync/local.rb +53 -0
- data/lib/backup/syncer/rsync/pull.rb +38 -0
- data/lib/backup/syncer/rsync/push.rb +113 -0
- data/lib/backup/syncer/s3.rb +47 -0
- data/lib/backup/template.rb +46 -0
- data/lib/backup/version.rb +43 -0
- data/spec/archive_spec.rb +335 -0
- data/spec/cleaner_spec.rb +304 -0
- data/spec/cli/helpers_spec.rb +176 -0
- data/spec/cli/utility_spec.rb +363 -0
- data/spec/compressor/base_spec.rb +31 -0
- data/spec/compressor/bzip2_spec.rb +83 -0
- data/spec/compressor/gzip_spec.rb +83 -0
- data/spec/compressor/lzma_spec.rb +83 -0
- data/spec/compressor/pbzip2_spec.rb +124 -0
- data/spec/config_spec.rb +321 -0
- data/spec/configuration/base_spec.rb +35 -0
- data/spec/configuration/compressor/bzip2_spec.rb +29 -0
- data/spec/configuration/compressor/gzip_spec.rb +29 -0
- data/spec/configuration/compressor/lzma_spec.rb +29 -0
- data/spec/configuration/compressor/pbzip2_spec.rb +32 -0
- data/spec/configuration/database/base_spec.rb +17 -0
- data/spec/configuration/database/mongodb_spec.rb +56 -0
- data/spec/configuration/database/mysql_spec.rb +53 -0
- data/spec/configuration/database/postgresql_spec.rb +53 -0
- data/spec/configuration/database/redis_spec.rb +50 -0
- data/spec/configuration/database/riak_spec.rb +35 -0
- data/spec/configuration/encryptor/gpg_spec.rb +26 -0
- data/spec/configuration/encryptor/open_ssl_spec.rb +35 -0
- data/spec/configuration/notifier/base_spec.rb +32 -0
- data/spec/configuration/notifier/campfire_spec.rb +32 -0
- data/spec/configuration/notifier/hipchat_spec.rb +44 -0
- data/spec/configuration/notifier/mail_spec.rb +71 -0
- data/spec/configuration/notifier/presently_spec.rb +35 -0
- data/spec/configuration/notifier/prowl_spec.rb +29 -0
- data/spec/configuration/notifier/twitter_spec.rb +35 -0
- data/spec/configuration/storage/cloudfiles_spec.rb +41 -0
- data/spec/configuration/storage/dropbox_spec.rb +38 -0
- data/spec/configuration/storage/ftp_spec.rb +44 -0
- data/spec/configuration/storage/local_spec.rb +29 -0
- data/spec/configuration/storage/ninefold_spec.rb +32 -0
- data/spec/configuration/storage/rsync_spec.rb +41 -0
- data/spec/configuration/storage/s3_spec.rb +38 -0
- data/spec/configuration/storage/scp_spec.rb +41 -0
- data/spec/configuration/storage/sftp_spec.rb +41 -0
- data/spec/configuration/syncer/cloud_files_spec.rb +44 -0
- data/spec/configuration/syncer/rsync/base_spec.rb +33 -0
- data/spec/configuration/syncer/rsync/local_spec.rb +10 -0
- data/spec/configuration/syncer/rsync/pull_spec.rb +10 -0
- data/spec/configuration/syncer/rsync/push_spec.rb +43 -0
- data/spec/configuration/syncer/s3_spec.rb +38 -0
- data/spec/database/base_spec.rb +54 -0
- data/spec/database/mongodb_spec.rb +428 -0
- data/spec/database/mysql_spec.rb +335 -0
- data/spec/database/postgresql_spec.rb +278 -0
- data/spec/database/redis_spec.rb +260 -0
- data/spec/database/riak_spec.rb +108 -0
- data/spec/dependency_spec.rb +49 -0
- data/spec/encryptor/base_spec.rb +30 -0
- data/spec/encryptor/gpg_spec.rb +134 -0
- data/spec/encryptor/open_ssl_spec.rb +129 -0
- data/spec/errors_spec.rb +306 -0
- data/spec/logger_spec.rb +363 -0
- data/spec/model_spec.rb +649 -0
- data/spec/notifier/base_spec.rb +89 -0
- data/spec/notifier/campfire_spec.rb +199 -0
- data/spec/notifier/hipchat_spec.rb +188 -0
- data/spec/notifier/mail_spec.rb +280 -0
- data/spec/notifier/presently_spec.rb +181 -0
- data/spec/notifier/prowl_spec.rb +117 -0
- data/spec/notifier/twitter_spec.rb +132 -0
- data/spec/package_spec.rb +61 -0
- data/spec/packager_spec.rb +225 -0
- data/spec/pipeline_spec.rb +257 -0
- data/spec/spec_helper.rb +59 -0
- data/spec/splitter_spec.rb +120 -0
- data/spec/storage/base_spec.rb +160 -0
- data/spec/storage/cloudfiles_spec.rb +230 -0
- data/spec/storage/cycler_spec.rb +239 -0
- data/spec/storage/dropbox_spec.rb +370 -0
- data/spec/storage/ftp_spec.rb +247 -0
- data/spec/storage/local_spec.rb +235 -0
- data/spec/storage/ninefold_spec.rb +319 -0
- data/spec/storage/rsync_spec.rb +345 -0
- data/spec/storage/s3_spec.rb +221 -0
- data/spec/storage/scp_spec.rb +209 -0
- data/spec/storage/sftp_spec.rb +220 -0
- data/spec/syncer/base_spec.rb +22 -0
- data/spec/syncer/cloud_files_spec.rb +192 -0
- data/spec/syncer/rsync/base_spec.rb +118 -0
- data/spec/syncer/rsync/local_spec.rb +121 -0
- data/spec/syncer/rsync/pull_spec.rb +90 -0
- data/spec/syncer/rsync/push_spec.rb +327 -0
- data/spec/syncer/s3_spec.rb +192 -0
- data/spec/version_spec.rb +21 -0
- data/templates/cli/utility/archive +25 -0
- data/templates/cli/utility/compressor/bzip2 +7 -0
- data/templates/cli/utility/compressor/gzip +7 -0
- data/templates/cli/utility/compressor/lzma +7 -0
- data/templates/cli/utility/compressor/pbzip2 +7 -0
- data/templates/cli/utility/config +31 -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 +12 -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/presently +13 -0
- data/templates/cli/utility/notifier/prowl +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 +48 -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 +45 -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 +311 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Notifier
|
6
|
+
class Base < Configuration::Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# When set to true, the user will be notified by email
|
11
|
+
# when a backup process ends without raising any exceptions
|
12
|
+
attr_accessor :on_success
|
13
|
+
|
14
|
+
##
|
15
|
+
# When set to true, the user will be notified by email
|
16
|
+
# when a backup process ends successfully, but logged warnings
|
17
|
+
attr_accessor :on_warning
|
18
|
+
|
19
|
+
##
|
20
|
+
# When set to true, the user will be notified by email
|
21
|
+
# when a backup process raises an exception before finishing
|
22
|
+
attr_accessor :on_failure
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Notifier
|
6
|
+
class Campfire < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Campfire api authentication token
|
11
|
+
attr_accessor :api_token
|
12
|
+
|
13
|
+
##
|
14
|
+
# Campfire account's subdomain
|
15
|
+
attr_accessor :subdomain
|
16
|
+
|
17
|
+
##
|
18
|
+
# Campfire account's room id
|
19
|
+
attr_accessor :room_id
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Notifier
|
6
|
+
class Hipchat < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
# From
|
10
|
+
# Name that appears in Hipchat
|
11
|
+
attr_accessor :from
|
12
|
+
|
13
|
+
# Hipchat API Token
|
14
|
+
# The token to interact with Hipchat
|
15
|
+
attr_accessor :token
|
16
|
+
|
17
|
+
# Rooms
|
18
|
+
# Rooms that you want to post notifications to
|
19
|
+
attr_accessor :rooms_notified
|
20
|
+
|
21
|
+
# Success Color
|
22
|
+
# The background color of a success message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
|
23
|
+
attr_accessor :success_color
|
24
|
+
|
25
|
+
# Warning Color
|
26
|
+
# The background color of a success message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
|
27
|
+
attr_accessor :warning_color
|
28
|
+
|
29
|
+
# Failure Color
|
30
|
+
# The background color of an error message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
|
31
|
+
attr_accessor :failure_color
|
32
|
+
|
33
|
+
# Notify Users
|
34
|
+
# (bool) Notify users in the room
|
35
|
+
attr_accessor :notify_users
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
@@ -0,0 +1,112 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Notifier
|
6
|
+
class Mail < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Mail delivery method to be used by the Mail gem.
|
11
|
+
# Supported methods:
|
12
|
+
#
|
13
|
+
# `:smtp` [::Mail::SMTP] (default)
|
14
|
+
# : Settings used only by this method:
|
15
|
+
# : `address`, `port`, `domain`, `user_name`, `password`
|
16
|
+
# : `authentication`, `enable_starttls_auto`, `openssl_verify_mode`
|
17
|
+
#
|
18
|
+
# `:sendmail` [::Mail::Sendmail]
|
19
|
+
# : Settings used only by this method:
|
20
|
+
# : `sendmail`, `sendmail_args`
|
21
|
+
#
|
22
|
+
# `:exim` [::Mail::Exim]
|
23
|
+
# : Settings used only by this method:
|
24
|
+
# : `exim`, `exim_args`
|
25
|
+
#
|
26
|
+
# `:file` [::Mail::FileDelivery]
|
27
|
+
# : Settings used only by this method:
|
28
|
+
# : `mail_folder`
|
29
|
+
#
|
30
|
+
attr_accessor :delivery_method
|
31
|
+
|
32
|
+
##
|
33
|
+
# Sender and Receiver email addresses
|
34
|
+
# Examples:
|
35
|
+
# sender - my.email.address@gmail.com
|
36
|
+
# receiver - your.email.address@gmail.com
|
37
|
+
attr_accessor :from, :to
|
38
|
+
|
39
|
+
##
|
40
|
+
# The address to use
|
41
|
+
# Example: smtp.gmail.com
|
42
|
+
attr_accessor :address
|
43
|
+
|
44
|
+
##
|
45
|
+
# The port to connect to
|
46
|
+
# Example: 587
|
47
|
+
attr_accessor :port
|
48
|
+
|
49
|
+
##
|
50
|
+
# Your domain (if applicable)
|
51
|
+
# Example: mydomain.com
|
52
|
+
attr_accessor :domain
|
53
|
+
|
54
|
+
##
|
55
|
+
# Username and Password (sender email's credentials)
|
56
|
+
# Examples:
|
57
|
+
# user_name - meskyanichi
|
58
|
+
# password - my_secret_password
|
59
|
+
attr_accessor :user_name, :password
|
60
|
+
|
61
|
+
##
|
62
|
+
# Authentication type
|
63
|
+
# Example: plain
|
64
|
+
attr_accessor :authentication
|
65
|
+
|
66
|
+
##
|
67
|
+
# Automatically set TLS
|
68
|
+
# Example: true
|
69
|
+
attr_accessor :enable_starttls_auto
|
70
|
+
|
71
|
+
##
|
72
|
+
# OpenSSL Verify Mode
|
73
|
+
# Example: none - Only use this option for a self-signed and/or wildcard certificate
|
74
|
+
attr_accessor :openssl_verify_mode
|
75
|
+
|
76
|
+
##
|
77
|
+
# When using the `:sendmail` `delivery_method` option,
|
78
|
+
# this may be used to specify the absolute path to `sendmail` (if needed)
|
79
|
+
# Example: '/usr/sbin/sendmail'
|
80
|
+
attr_accessor :sendmail
|
81
|
+
|
82
|
+
##
|
83
|
+
# Optional arguments to pass to `sendmail`
|
84
|
+
# Note that this will override the defaults set by the Mail gem (currently: '-i -t')
|
85
|
+
# So, if set here, be sure to set all the arguments you require.
|
86
|
+
# Example: '-i -t -X/tmp/traffic.log'
|
87
|
+
attr_accessor :sendmail_args
|
88
|
+
|
89
|
+
##
|
90
|
+
# When using the `:exim` `delivery_method` option,
|
91
|
+
# this may be used to specify the absolute path to `exim` (if needed)
|
92
|
+
# Example: '/usr/sbin/exim'
|
93
|
+
attr_accessor :exim
|
94
|
+
|
95
|
+
##
|
96
|
+
# Optional arguments to pass to `exim`
|
97
|
+
# Note that this will override the defaults set by the Mail gem (currently: '-i -t')
|
98
|
+
# So, if set here, be sure to set all the arguments you require.
|
99
|
+
# Example: '-i -t -X/tmp/traffic.log'
|
100
|
+
attr_accessor :exim_args
|
101
|
+
|
102
|
+
##
|
103
|
+
# Folder where mail will be kept when using the `:file` `delivery_method` option.
|
104
|
+
# Default location is '$HOME/backup-mails'
|
105
|
+
# Example: '/tmp/test-mails'
|
106
|
+
attr_accessor :mail_folder
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Notifier
|
6
|
+
class Presently < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Presently subdomain
|
11
|
+
attr_accessor :subdomain
|
12
|
+
|
13
|
+
##
|
14
|
+
# Presently credentials
|
15
|
+
attr_accessor :user_name, :password
|
16
|
+
|
17
|
+
##
|
18
|
+
# Group id
|
19
|
+
attr_accessor :group_id
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Notifier
|
6
|
+
class Prowl < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Application name
|
11
|
+
# Tell something like your server name. Example: "Server1 Backup"
|
12
|
+
attr_accessor :application
|
13
|
+
|
14
|
+
##
|
15
|
+
# API-Key
|
16
|
+
# Create a Prowl account and request an API key on prowlapp.com.
|
17
|
+
attr_accessor :api_key
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Notifier
|
6
|
+
class Twitter < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Twitter consumer key credentials
|
11
|
+
attr_accessor :consumer_key, :consumer_secret
|
12
|
+
|
13
|
+
##
|
14
|
+
# OAuth credentials
|
15
|
+
attr_accessor :oauth_token, :oauth_token_secret
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Storage
|
6
|
+
class Base < Configuration::Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Sets the limit to how many backups to keep in the remote location.
|
11
|
+
# If the limit exceeds it will remove the oldest backup to make room for the newest
|
12
|
+
attr_accessor :keep
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Storage
|
6
|
+
class CloudFiles < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Rackspace Cloud Files Credentials
|
11
|
+
attr_accessor :api_key, :username, :auth_url
|
12
|
+
|
13
|
+
##
|
14
|
+
# Rackspace Service Net (Allows for LAN-based transfers to avoid charges and improve performance)
|
15
|
+
attr_accessor :servicenet
|
16
|
+
|
17
|
+
##
|
18
|
+
# Rackspace Cloud Files container name and path
|
19
|
+
attr_accessor :container, :path
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Storage
|
6
|
+
class Dropbox < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Dropbox API credentials
|
11
|
+
attr_accessor :api_key, :api_secret
|
12
|
+
|
13
|
+
##
|
14
|
+
# Dropbox Access Type
|
15
|
+
# Valid values are:
|
16
|
+
# :app_folder (default)
|
17
|
+
# :dropbox (full access)
|
18
|
+
attr_accessor :access_type
|
19
|
+
|
20
|
+
##
|
21
|
+
# Path to where the backups will be stored
|
22
|
+
attr_accessor :path
|
23
|
+
|
24
|
+
|
25
|
+
# DEPRECATED METHODS #############################################
|
26
|
+
|
27
|
+
# Deprecated as of v3.0.21 - for move to official 'dropbox-sdk' gem (v1.1)
|
28
|
+
attr_reader :timeout
|
29
|
+
def timeout=(value)
|
30
|
+
Logger.warn "[DEPRECATED] Backup::Configuration::Storage::Dropbox.timeout=\n" +
|
31
|
+
" is deprecated and will be removed at some point."
|
32
|
+
end
|
33
|
+
|
34
|
+
def email
|
35
|
+
Logger.warn "[DEPRECATED] Backup::Configuration::Storage::Dropbox.email\n" +
|
36
|
+
" is deprecated and will be removed at some point."
|
37
|
+
end
|
38
|
+
|
39
|
+
def email=(value)
|
40
|
+
Logger.warn "[DEPRECATED] Backup::Configuration::Storage::Dropbox.email=\n" +
|
41
|
+
" is deprecated and will be removed at some point."
|
42
|
+
end
|
43
|
+
|
44
|
+
def password
|
45
|
+
Logger.warn "[DEPRECATED] Backup::Configuration::Storage::Dropbox.password\n" +
|
46
|
+
" is deprecated and will be removed at some point."
|
47
|
+
end
|
48
|
+
|
49
|
+
def password=(value)
|
50
|
+
Logger.warn "[DEPRECATED] Backup::Configuration::Storage::Dropbox.password=\n" +
|
51
|
+
" is deprecated and will be removed at some point."
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Storage
|
6
|
+
class FTP < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Server credentials
|
11
|
+
attr_accessor :username, :password
|
12
|
+
|
13
|
+
##
|
14
|
+
# Server IP Address and FTP port
|
15
|
+
attr_accessor :ip, :port
|
16
|
+
|
17
|
+
##
|
18
|
+
# Path to store backups to
|
19
|
+
attr_accessor :path
|
20
|
+
|
21
|
+
##
|
22
|
+
# use passive mode?
|
23
|
+
attr_accessor :passive_mode
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Backup
|
4
|
+
module Configuration
|
5
|
+
module Storage
|
6
|
+
class Ninefold < Base
|
7
|
+
class << self
|
8
|
+
|
9
|
+
##
|
10
|
+
# Ninefold Credentials
|
11
|
+
attr_accessor :storage_token, :storage_secret
|
12
|
+
|
13
|
+
##
|
14
|
+
# Ninefold path
|
15
|
+
attr_accessor :path
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|