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.

Files changed (244) hide show
  1. data/.gitignore +7 -0
  2. data/.travis.yml +10 -0
  3. data/Gemfile +28 -0
  4. data/Gemfile.lock +130 -0
  5. data/Guardfile +21 -0
  6. data/LICENSE.md +24 -0
  7. data/README.md +476 -0
  8. data/backup_checksum.gemspec +32 -0
  9. data/bin/backup +11 -0
  10. data/lib/backup.rb +217 -0
  11. data/lib/backup/archive.rb +117 -0
  12. data/lib/backup/binder.rb +22 -0
  13. data/lib/backup/checksum/base.rb +44 -0
  14. data/lib/backup/checksum/shasum.rb +16 -0
  15. data/lib/backup/cleaner.rb +121 -0
  16. data/lib/backup/cli/helpers.rb +88 -0
  17. data/lib/backup/cli/utility.rb +247 -0
  18. data/lib/backup/compressor/base.rb +29 -0
  19. data/lib/backup/compressor/bzip2.rb +50 -0
  20. data/lib/backup/compressor/gzip.rb +47 -0
  21. data/lib/backup/compressor/lzma.rb +50 -0
  22. data/lib/backup/compressor/pbzip2.rb +56 -0
  23. data/lib/backup/config.rb +173 -0
  24. data/lib/backup/configuration/base.rb +15 -0
  25. data/lib/backup/configuration/checksum/base.rb +9 -0
  26. data/lib/backup/configuration/checksum/shasum.rb +9 -0
  27. data/lib/backup/configuration/compressor/base.rb +9 -0
  28. data/lib/backup/configuration/compressor/bzip2.rb +23 -0
  29. data/lib/backup/configuration/compressor/gzip.rb +23 -0
  30. data/lib/backup/configuration/compressor/lzma.rb +23 -0
  31. data/lib/backup/configuration/compressor/pbzip2.rb +28 -0
  32. data/lib/backup/configuration/database/base.rb +19 -0
  33. data/lib/backup/configuration/database/mongodb.rb +49 -0
  34. data/lib/backup/configuration/database/mysql.rb +42 -0
  35. data/lib/backup/configuration/database/postgresql.rb +41 -0
  36. data/lib/backup/configuration/database/redis.rb +39 -0
  37. data/lib/backup/configuration/database/riak.rb +29 -0
  38. data/lib/backup/configuration/encryptor/base.rb +9 -0
  39. data/lib/backup/configuration/encryptor/gpg.rb +17 -0
  40. data/lib/backup/configuration/encryptor/open_ssl.rb +32 -0
  41. data/lib/backup/configuration/helpers.rb +52 -0
  42. data/lib/backup/configuration/notifier/base.rb +28 -0
  43. data/lib/backup/configuration/notifier/campfire.rb +25 -0
  44. data/lib/backup/configuration/notifier/hipchat.rb +41 -0
  45. data/lib/backup/configuration/notifier/mail.rb +112 -0
  46. data/lib/backup/configuration/notifier/presently.rb +25 -0
  47. data/lib/backup/configuration/notifier/prowl.rb +23 -0
  48. data/lib/backup/configuration/notifier/twitter.rb +21 -0
  49. data/lib/backup/configuration/storage/base.rb +18 -0
  50. data/lib/backup/configuration/storage/cloudfiles.rb +25 -0
  51. data/lib/backup/configuration/storage/dropbox.rb +58 -0
  52. data/lib/backup/configuration/storage/ftp.rb +29 -0
  53. data/lib/backup/configuration/storage/local.rb +17 -0
  54. data/lib/backup/configuration/storage/ninefold.rb +20 -0
  55. data/lib/backup/configuration/storage/rsync.rb +29 -0
  56. data/lib/backup/configuration/storage/s3.rb +25 -0
  57. data/lib/backup/configuration/storage/scp.rb +25 -0
  58. data/lib/backup/configuration/storage/sftp.rb +25 -0
  59. data/lib/backup/configuration/syncer/base.rb +10 -0
  60. data/lib/backup/configuration/syncer/cloud.rb +23 -0
  61. data/lib/backup/configuration/syncer/cloud_files.rb +30 -0
  62. data/lib/backup/configuration/syncer/rsync/base.rb +28 -0
  63. data/lib/backup/configuration/syncer/rsync/local.rb +11 -0
  64. data/lib/backup/configuration/syncer/rsync/pull.rb +11 -0
  65. data/lib/backup/configuration/syncer/rsync/push.rb +31 -0
  66. data/lib/backup/configuration/syncer/s3.rb +23 -0
  67. data/lib/backup/database/base.rb +59 -0
  68. data/lib/backup/database/mongodb.rb +232 -0
  69. data/lib/backup/database/mysql.rb +163 -0
  70. data/lib/backup/database/postgresql.rb +146 -0
  71. data/lib/backup/database/redis.rb +139 -0
  72. data/lib/backup/database/riak.rb +69 -0
  73. data/lib/backup/dependency.rb +114 -0
  74. data/lib/backup/encryptor/base.rb +29 -0
  75. data/lib/backup/encryptor/gpg.rb +80 -0
  76. data/lib/backup/encryptor/open_ssl.rb +72 -0
  77. data/lib/backup/errors.rb +124 -0
  78. data/lib/backup/logger.rb +152 -0
  79. data/lib/backup/model.rb +386 -0
  80. data/lib/backup/notifier/base.rb +81 -0
  81. data/lib/backup/notifier/campfire.rb +168 -0
  82. data/lib/backup/notifier/hipchat.rb +99 -0
  83. data/lib/backup/notifier/mail.rb +206 -0
  84. data/lib/backup/notifier/presently.rb +88 -0
  85. data/lib/backup/notifier/prowl.rb +65 -0
  86. data/lib/backup/notifier/twitter.rb +70 -0
  87. data/lib/backup/package.rb +51 -0
  88. data/lib/backup/packager.rb +108 -0
  89. data/lib/backup/pipeline.rb +107 -0
  90. data/lib/backup/splitter.rb +75 -0
  91. data/lib/backup/storage/base.rb +119 -0
  92. data/lib/backup/storage/cloudfiles.rb +87 -0
  93. data/lib/backup/storage/cycler.rb +117 -0
  94. data/lib/backup/storage/dropbox.rb +181 -0
  95. data/lib/backup/storage/ftp.rb +119 -0
  96. data/lib/backup/storage/local.rb +82 -0
  97. data/lib/backup/storage/ninefold.rb +116 -0
  98. data/lib/backup/storage/rsync.rb +149 -0
  99. data/lib/backup/storage/s3.rb +94 -0
  100. data/lib/backup/storage/scp.rb +99 -0
  101. data/lib/backup/storage/sftp.rb +108 -0
  102. data/lib/backup/syncer/base.rb +42 -0
  103. data/lib/backup/syncer/cloud.rb +190 -0
  104. data/lib/backup/syncer/cloud_files.rb +56 -0
  105. data/lib/backup/syncer/rsync/base.rb +52 -0
  106. data/lib/backup/syncer/rsync/local.rb +53 -0
  107. data/lib/backup/syncer/rsync/pull.rb +38 -0
  108. data/lib/backup/syncer/rsync/push.rb +113 -0
  109. data/lib/backup/syncer/s3.rb +47 -0
  110. data/lib/backup/template.rb +46 -0
  111. data/lib/backup/version.rb +43 -0
  112. data/spec/archive_spec.rb +335 -0
  113. data/spec/cleaner_spec.rb +304 -0
  114. data/spec/cli/helpers_spec.rb +176 -0
  115. data/spec/cli/utility_spec.rb +363 -0
  116. data/spec/compressor/base_spec.rb +31 -0
  117. data/spec/compressor/bzip2_spec.rb +83 -0
  118. data/spec/compressor/gzip_spec.rb +83 -0
  119. data/spec/compressor/lzma_spec.rb +83 -0
  120. data/spec/compressor/pbzip2_spec.rb +124 -0
  121. data/spec/config_spec.rb +321 -0
  122. data/spec/configuration/base_spec.rb +35 -0
  123. data/spec/configuration/compressor/bzip2_spec.rb +29 -0
  124. data/spec/configuration/compressor/gzip_spec.rb +29 -0
  125. data/spec/configuration/compressor/lzma_spec.rb +29 -0
  126. data/spec/configuration/compressor/pbzip2_spec.rb +32 -0
  127. data/spec/configuration/database/base_spec.rb +17 -0
  128. data/spec/configuration/database/mongodb_spec.rb +56 -0
  129. data/spec/configuration/database/mysql_spec.rb +53 -0
  130. data/spec/configuration/database/postgresql_spec.rb +53 -0
  131. data/spec/configuration/database/redis_spec.rb +50 -0
  132. data/spec/configuration/database/riak_spec.rb +35 -0
  133. data/spec/configuration/encryptor/gpg_spec.rb +26 -0
  134. data/spec/configuration/encryptor/open_ssl_spec.rb +35 -0
  135. data/spec/configuration/notifier/base_spec.rb +32 -0
  136. data/spec/configuration/notifier/campfire_spec.rb +32 -0
  137. data/spec/configuration/notifier/hipchat_spec.rb +44 -0
  138. data/spec/configuration/notifier/mail_spec.rb +71 -0
  139. data/spec/configuration/notifier/presently_spec.rb +35 -0
  140. data/spec/configuration/notifier/prowl_spec.rb +29 -0
  141. data/spec/configuration/notifier/twitter_spec.rb +35 -0
  142. data/spec/configuration/storage/cloudfiles_spec.rb +41 -0
  143. data/spec/configuration/storage/dropbox_spec.rb +38 -0
  144. data/spec/configuration/storage/ftp_spec.rb +44 -0
  145. data/spec/configuration/storage/local_spec.rb +29 -0
  146. data/spec/configuration/storage/ninefold_spec.rb +32 -0
  147. data/spec/configuration/storage/rsync_spec.rb +41 -0
  148. data/spec/configuration/storage/s3_spec.rb +38 -0
  149. data/spec/configuration/storage/scp_spec.rb +41 -0
  150. data/spec/configuration/storage/sftp_spec.rb +41 -0
  151. data/spec/configuration/syncer/cloud_files_spec.rb +44 -0
  152. data/spec/configuration/syncer/rsync/base_spec.rb +33 -0
  153. data/spec/configuration/syncer/rsync/local_spec.rb +10 -0
  154. data/spec/configuration/syncer/rsync/pull_spec.rb +10 -0
  155. data/spec/configuration/syncer/rsync/push_spec.rb +43 -0
  156. data/spec/configuration/syncer/s3_spec.rb +38 -0
  157. data/spec/database/base_spec.rb +54 -0
  158. data/spec/database/mongodb_spec.rb +428 -0
  159. data/spec/database/mysql_spec.rb +335 -0
  160. data/spec/database/postgresql_spec.rb +278 -0
  161. data/spec/database/redis_spec.rb +260 -0
  162. data/spec/database/riak_spec.rb +108 -0
  163. data/spec/dependency_spec.rb +49 -0
  164. data/spec/encryptor/base_spec.rb +30 -0
  165. data/spec/encryptor/gpg_spec.rb +134 -0
  166. data/spec/encryptor/open_ssl_spec.rb +129 -0
  167. data/spec/errors_spec.rb +306 -0
  168. data/spec/logger_spec.rb +363 -0
  169. data/spec/model_spec.rb +649 -0
  170. data/spec/notifier/base_spec.rb +89 -0
  171. data/spec/notifier/campfire_spec.rb +199 -0
  172. data/spec/notifier/hipchat_spec.rb +188 -0
  173. data/spec/notifier/mail_spec.rb +280 -0
  174. data/spec/notifier/presently_spec.rb +181 -0
  175. data/spec/notifier/prowl_spec.rb +117 -0
  176. data/spec/notifier/twitter_spec.rb +132 -0
  177. data/spec/package_spec.rb +61 -0
  178. data/spec/packager_spec.rb +225 -0
  179. data/spec/pipeline_spec.rb +257 -0
  180. data/spec/spec_helper.rb +59 -0
  181. data/spec/splitter_spec.rb +120 -0
  182. data/spec/storage/base_spec.rb +160 -0
  183. data/spec/storage/cloudfiles_spec.rb +230 -0
  184. data/spec/storage/cycler_spec.rb +239 -0
  185. data/spec/storage/dropbox_spec.rb +370 -0
  186. data/spec/storage/ftp_spec.rb +247 -0
  187. data/spec/storage/local_spec.rb +235 -0
  188. data/spec/storage/ninefold_spec.rb +319 -0
  189. data/spec/storage/rsync_spec.rb +345 -0
  190. data/spec/storage/s3_spec.rb +221 -0
  191. data/spec/storage/scp_spec.rb +209 -0
  192. data/spec/storage/sftp_spec.rb +220 -0
  193. data/spec/syncer/base_spec.rb +22 -0
  194. data/spec/syncer/cloud_files_spec.rb +192 -0
  195. data/spec/syncer/rsync/base_spec.rb +118 -0
  196. data/spec/syncer/rsync/local_spec.rb +121 -0
  197. data/spec/syncer/rsync/pull_spec.rb +90 -0
  198. data/spec/syncer/rsync/push_spec.rb +327 -0
  199. data/spec/syncer/s3_spec.rb +192 -0
  200. data/spec/version_spec.rb +21 -0
  201. data/templates/cli/utility/archive +25 -0
  202. data/templates/cli/utility/compressor/bzip2 +7 -0
  203. data/templates/cli/utility/compressor/gzip +7 -0
  204. data/templates/cli/utility/compressor/lzma +7 -0
  205. data/templates/cli/utility/compressor/pbzip2 +7 -0
  206. data/templates/cli/utility/config +31 -0
  207. data/templates/cli/utility/database/mongodb +18 -0
  208. data/templates/cli/utility/database/mysql +21 -0
  209. data/templates/cli/utility/database/postgresql +17 -0
  210. data/templates/cli/utility/database/redis +16 -0
  211. data/templates/cli/utility/database/riak +11 -0
  212. data/templates/cli/utility/encryptor/gpg +12 -0
  213. data/templates/cli/utility/encryptor/openssl +9 -0
  214. data/templates/cli/utility/model.erb +23 -0
  215. data/templates/cli/utility/notifier/campfire +12 -0
  216. data/templates/cli/utility/notifier/hipchat +15 -0
  217. data/templates/cli/utility/notifier/mail +22 -0
  218. data/templates/cli/utility/notifier/presently +13 -0
  219. data/templates/cli/utility/notifier/prowl +11 -0
  220. data/templates/cli/utility/notifier/twitter +13 -0
  221. data/templates/cli/utility/splitter +7 -0
  222. data/templates/cli/utility/storage/cloud_files +22 -0
  223. data/templates/cli/utility/storage/dropbox +20 -0
  224. data/templates/cli/utility/storage/ftp +12 -0
  225. data/templates/cli/utility/storage/local +7 -0
  226. data/templates/cli/utility/storage/ninefold +9 -0
  227. data/templates/cli/utility/storage/rsync +11 -0
  228. data/templates/cli/utility/storage/s3 +19 -0
  229. data/templates/cli/utility/storage/scp +11 -0
  230. data/templates/cli/utility/storage/sftp +11 -0
  231. data/templates/cli/utility/syncer/cloud_files +48 -0
  232. data/templates/cli/utility/syncer/rsync_local +12 -0
  233. data/templates/cli/utility/syncer/rsync_pull +17 -0
  234. data/templates/cli/utility/syncer/rsync_push +17 -0
  235. data/templates/cli/utility/syncer/s3 +45 -0
  236. data/templates/general/links +11 -0
  237. data/templates/general/version.erb +2 -0
  238. data/templates/notifier/mail/failure.erb +9 -0
  239. data/templates/notifier/mail/success.erb +7 -0
  240. data/templates/notifier/mail/warning.erb +9 -0
  241. data/templates/storage/dropbox/authorization_url.erb +6 -0
  242. data/templates/storage/dropbox/authorized.erb +4 -0
  243. data/templates/storage/dropbox/cache_file_written.erb +10 -0
  244. metadata +311 -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,7 @@
1
+ ##
2
+ # Bzip2 [Compressor]
3
+ #
4
+ compress_with Bzip2 do |compression|
5
+ compression.best = true
6
+ compression.fast = false
7
+ end
@@ -0,0 +1,7 @@
1
+ ##
2
+ # Gzip [Compressor]
3
+ #
4
+ compress_with Gzip do |compression|
5
+ compression.best = true
6
+ compression.fast = false
7
+ end
@@ -0,0 +1,7 @@
1
+ ##
2
+ # Lzma [Compressor]
3
+ #
4
+ compress_with Lzma do |compression|
5
+ compression.best = true
6
+ compression.fast = false
7
+ end
@@ -0,0 +1,7 @@
1
+ ##
2
+ # Pbzip2 [Compressor]
3
+ #
4
+ compress_with Pbzip2 do |compression|
5
+ compression.best = true
6
+ compression.fast = false
7
+ end
@@ -0,0 +1,31 @@
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
+ Backup::Configuration::Storage::S3.defaults do |s3|
17
+ # s3.access_key_id = "my_access_key_id"
18
+ # s3.secret_access_key = "my_secret_access_key"
19
+ end
20
+
21
+ Backup::Configuration::Encryptor::OpenSSL.defaults do |encryption|
22
+ # encryption.password = "my_password"
23
+ # encryption.base64 = true
24
+ # encryption.salt = true
25
+ end
26
+
27
+ ##
28
+ # Load all models from the models directory (after the above global configuration blocks)
29
+ Dir[File.join(File.dirname(Config.config_file), "models", "*.rb")].each do |model|
30
+ instance_eval(File.read(model))
31
+ 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,12 @@
1
+ ##
2
+ # GPG [Encryptor]
3
+ #
4
+ encrypt_with GPG do |encryption|
5
+ encryption.key = <<-KEY
6
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
7
+ Version: GnuPG v1.4.11 (Darwin)
8
+
9
+ <Your GPG Public Key Here>
10
+ -----END PGP PUBLIC KEY BLOCK-----
11
+ KEY
12
+ end
@@ -0,0 +1,9 @@
1
+ ##
2
+ # OpenSSL [Encryptor]
3
+ #
4
+ encrypt_with OpenSSL do |encryption|
5
+ encryption.password = "my_password" # From String
6
+ encryption.password_file = "/path/to/password/file" # Or from File
7
+ encryption.base64 = true
8
+ encryption.salt = true
9
+ 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
+ # Presently [Notifier]
3
+ #
4
+ notify_by Presently do |presently|
5
+ presently.on_success = true
6
+ presently.on_warning = true
7
+ presently.on_failure = true
8
+
9
+ presently.subdomain = "my_subdomain"
10
+ presently.user_name = "my_user_name"
11
+ presently.password = "my_password"
12
+ presently.group_id = "my_group_id" # optional
13
+ end
@@ -0,0 +1,11 @@
1
+ ##
2
+ # Prowl [Notifier]
3
+ #
4
+ notify_by Prowl do |prowl|
5
+ prowl.on_success = true
6
+ prowl.on_warning = true
7
+ prowl.on_failure = true
8
+
9
+ prowl.application = "my_application"
10
+ prowl.api_key = "my_api_key"
11
+ 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,7 @@
1
+ ##
2
+ # Split [Splitter]
3
+ #
4
+ # Split the backup file in to chunks of 250 megabytes
5
+ # if the backup file size exceeds 250 megabytes
6
+ #
7
+ split_into_chunks_of 250
@@ -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
@@ -0,0 +1,7 @@
1
+ ##
2
+ # Local (Copy) [Storage]
3
+ #
4
+ store_with Local do |local|
5
+ local.path = "~/backups/"
6
+ local.keep = 5
7
+ end
@@ -0,0 +1,9 @@
1
+ ##
2
+ # Ninefold Cloud Storage [Storage]
3
+ #
4
+ store_with Ninefold do |nf|
5
+ nf.storage_token = "my_storage_token"
6
+ nf.storage_secret = "my_storage_secret"
7
+ nf.path = "/path/to/my/backups"
8
+ nf.keep = 10
9
+ end
@@ -0,0 +1,11 @@
1
+ ##
2
+ # RSync [Storage]
3
+ #
4
+ store_with RSync do |server|
5
+ server.username = "my_username"
6
+ server.password = "my_password"
7
+ server.ip = "123.45.678.90"
8
+ server.port = 22
9
+ server.path = "~/backups/"
10
+ server.local = false
11
+ end