backup 3.0.19 → 3.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +9 -8
  3. data/Gemfile.lock +19 -1
  4. data/Guardfile +13 -9
  5. data/README.md +93 -31
  6. data/backup.gemspec +3 -3
  7. data/bin/backup +6 -283
  8. data/lib/backup.rb +101 -72
  9. data/lib/backup/archive.rb +21 -9
  10. data/lib/backup/binder.rb +22 -0
  11. data/lib/backup/cleaner.rb +36 -0
  12. data/lib/backup/cli/helpers.rb +103 -0
  13. data/lib/backup/cli/utility.rb +308 -0
  14. data/lib/backup/compressor/base.rb +2 -2
  15. data/lib/backup/compressor/pbzip2.rb +76 -0
  16. data/lib/backup/configuration/compressor/pbzip2.rb +28 -0
  17. data/lib/backup/configuration/database/riak.rb +25 -0
  18. data/lib/backup/configuration/encryptor/open_ssl.rb +6 -0
  19. data/lib/backup/configuration/helpers.rb +5 -18
  20. data/lib/backup/configuration/notifier/base.rb +13 -0
  21. data/lib/backup/configuration/notifier/hipchat.rb +41 -0
  22. data/lib/backup/configuration/notifier/mail.rb +38 -0
  23. data/lib/backup/configuration/notifier/prowl.rb +23 -0
  24. data/lib/backup/configuration/storage/cloudfiles.rb +4 -0
  25. data/lib/backup/configuration/storage/dropbox.rb +8 -4
  26. data/lib/backup/database/base.rb +10 -2
  27. data/lib/backup/database/mongodb.rb +16 -19
  28. data/lib/backup/database/mysql.rb +2 -2
  29. data/lib/backup/database/postgresql.rb +2 -2
  30. data/lib/backup/database/redis.rb +15 -7
  31. data/lib/backup/database/riak.rb +45 -0
  32. data/lib/backup/dependency.rb +21 -7
  33. data/lib/backup/encryptor/base.rb +1 -1
  34. data/lib/backup/encryptor/open_ssl.rb +20 -5
  35. data/lib/backup/errors.rb +124 -0
  36. data/lib/backup/finder.rb +11 -3
  37. data/lib/backup/logger.rb +121 -82
  38. data/lib/backup/model.rb +103 -44
  39. data/lib/backup/notifier/base.rb +50 -0
  40. data/lib/backup/notifier/campfire.rb +32 -52
  41. data/lib/backup/notifier/hipchat.rb +99 -0
  42. data/lib/backup/notifier/mail.rb +100 -61
  43. data/lib/backup/notifier/presently.rb +31 -40
  44. data/lib/backup/notifier/prowl.rb +73 -0
  45. data/lib/backup/notifier/twitter.rb +29 -39
  46. data/lib/backup/packager.rb +25 -0
  47. data/lib/backup/splitter.rb +62 -0
  48. data/lib/backup/storage/base.rb +178 -18
  49. data/lib/backup/storage/cloudfiles.rb +34 -28
  50. data/lib/backup/storage/dropbox.rb +64 -67
  51. data/lib/backup/storage/ftp.rb +48 -40
  52. data/lib/backup/storage/local.rb +33 -28
  53. data/lib/backup/storage/ninefold.rb +40 -26
  54. data/lib/backup/storage/object.rb +8 -6
  55. data/lib/backup/storage/rsync.rb +61 -51
  56. data/lib/backup/storage/s3.rb +29 -27
  57. data/lib/backup/storage/scp.rb +56 -36
  58. data/lib/backup/storage/sftp.rb +49 -33
  59. data/lib/backup/syncer/base.rb +1 -1
  60. data/lib/backup/syncer/rsync.rb +1 -1
  61. data/lib/backup/template.rb +46 -0
  62. data/lib/backup/version.rb +1 -1
  63. data/spec/archive_spec.rb +34 -9
  64. data/spec/backup_spec.rb +1 -1
  65. data/spec/cli/helpers_spec.rb +35 -0
  66. data/spec/cli/utility_spec.rb +38 -0
  67. data/spec/compressor/bzip2_spec.rb +1 -1
  68. data/spec/compressor/gzip_spec.rb +1 -1
  69. data/spec/compressor/lzma_spec.rb +1 -1
  70. data/spec/compressor/pbzip2_spec.rb +63 -0
  71. data/spec/configuration/base_spec.rb +1 -1
  72. data/spec/configuration/compressor/bzip2_spec.rb +1 -1
  73. data/spec/configuration/compressor/gzip_spec.rb +1 -1
  74. data/spec/configuration/compressor/lzma_spec.rb +1 -1
  75. data/spec/configuration/database/base_spec.rb +1 -1
  76. data/spec/configuration/database/mongodb_spec.rb +1 -1
  77. data/spec/configuration/database/mysql_spec.rb +1 -1
  78. data/spec/configuration/database/postgresql_spec.rb +1 -1
  79. data/spec/configuration/database/redis_spec.rb +1 -1
  80. data/spec/configuration/database/riak_spec.rb +31 -0
  81. data/spec/configuration/encryptor/gpg_spec.rb +1 -1
  82. data/spec/configuration/encryptor/open_ssl_spec.rb +4 -1
  83. data/spec/configuration/notifier/campfire_spec.rb +1 -1
  84. data/spec/configuration/notifier/hipchat_spec.rb +43 -0
  85. data/spec/configuration/notifier/mail_spec.rb +34 -22
  86. data/spec/configuration/notifier/presently_spec.rb +1 -1
  87. data/spec/configuration/notifier/prowl_spec.rb +28 -0
  88. data/spec/configuration/notifier/twitter_spec.rb +1 -1
  89. data/spec/configuration/storage/cloudfiles_spec.rb +19 -16
  90. data/spec/configuration/storage/dropbox_spec.rb +1 -1
  91. data/spec/configuration/storage/ftp_spec.rb +1 -1
  92. data/spec/configuration/storage/local_spec.rb +1 -1
  93. data/spec/configuration/storage/ninefold_spec.rb +1 -1
  94. data/spec/configuration/storage/rsync_spec.rb +1 -1
  95. data/spec/configuration/storage/s3_spec.rb +1 -1
  96. data/spec/configuration/storage/scp_spec.rb +1 -1
  97. data/spec/configuration/storage/sftp_spec.rb +1 -1
  98. data/spec/configuration/syncer/rsync_spec.rb +1 -1
  99. data/spec/configuration/syncer/s3_spec.rb +1 -1
  100. data/spec/database/base_spec.rb +10 -1
  101. data/spec/database/mongodb_spec.rb +34 -7
  102. data/spec/database/mysql_spec.rb +8 -7
  103. data/spec/database/postgresql_spec.rb +8 -7
  104. data/spec/database/redis_spec.rb +39 -9
  105. data/spec/database/riak_spec.rb +50 -0
  106. data/spec/encryptor/gpg_spec.rb +1 -1
  107. data/spec/encryptor/open_ssl_spec.rb +77 -20
  108. data/spec/errors_spec.rb +306 -0
  109. data/spec/finder_spec.rb +91 -0
  110. data/spec/logger_spec.rb +254 -33
  111. data/spec/model_spec.rb +120 -15
  112. data/spec/notifier/campfire_spec.rb +127 -52
  113. data/spec/notifier/hipchat_spec.rb +193 -0
  114. data/spec/notifier/mail_spec.rb +290 -74
  115. data/spec/notifier/presently_spec.rb +290 -73
  116. data/spec/notifier/prowl_spec.rb +149 -0
  117. data/spec/notifier/twitter_spec.rb +106 -41
  118. data/spec/spec_helper.rb +8 -2
  119. data/spec/splitter_spec.rb +71 -0
  120. data/spec/storage/base_spec.rb +280 -19
  121. data/spec/storage/cloudfiles_spec.rb +38 -22
  122. data/spec/storage/dropbox_spec.rb +17 -13
  123. data/spec/storage/ftp_spec.rb +145 -55
  124. data/spec/storage/local_spec.rb +6 -6
  125. data/spec/storage/ninefold_spec.rb +70 -29
  126. data/spec/storage/object_spec.rb +44 -44
  127. data/spec/storage/rsync_spec.rb +186 -63
  128. data/spec/storage/s3_spec.rb +23 -24
  129. data/spec/storage/scp_spec.rb +116 -41
  130. data/spec/storage/sftp_spec.rb +124 -46
  131. data/spec/syncer/rsync_spec.rb +3 -3
  132. data/spec/syncer/s3_spec.rb +1 -1
  133. data/spec/version_spec.rb +1 -1
  134. data/templates/cli/utility/archive +13 -0
  135. data/{lib/templates → templates/cli/utility}/compressor/bzip2 +1 -1
  136. data/{lib/templates → templates/cli/utility}/compressor/gzip +1 -1
  137. data/{lib/templates → templates/cli/utility}/compressor/lzma +0 -0
  138. data/templates/cli/utility/compressor/pbzip2 +7 -0
  139. data/templates/cli/utility/config +31 -0
  140. data/{lib/templates → templates/cli/utility}/database/mongodb +1 -1
  141. data/{lib/templates → templates/cli/utility}/database/mysql +1 -1
  142. data/{lib/templates → templates/cli/utility}/database/postgresql +1 -1
  143. data/{lib/templates → templates/cli/utility}/database/redis +1 -1
  144. data/templates/cli/utility/database/riak +8 -0
  145. data/{lib/templates → templates/cli/utility}/encryptor/gpg +1 -1
  146. data/templates/cli/utility/encryptor/openssl +9 -0
  147. data/templates/cli/utility/model.erb +23 -0
  148. data/{lib/templates → templates/cli/utility}/notifier/campfire +2 -1
  149. data/templates/cli/utility/notifier/hipchat +15 -0
  150. data/{lib/templates → templates/cli/utility}/notifier/mail +6 -1
  151. data/{lib/templates → templates/cli/utility}/notifier/presently +1 -0
  152. data/templates/cli/utility/notifier/prowl +11 -0
  153. data/{lib/templates → templates/cli/utility}/notifier/twitter +2 -1
  154. data/templates/cli/utility/splitter +7 -0
  155. data/templates/cli/utility/storage/cloudfiles +12 -0
  156. data/{lib/templates → templates/cli/utility}/storage/dropbox +1 -1
  157. data/{lib/templates → templates/cli/utility}/storage/ftp +0 -0
  158. data/templates/cli/utility/storage/local +7 -0
  159. data/{lib/templates → templates/cli/utility}/storage/ninefold +1 -1
  160. data/templates/cli/utility/storage/rsync +11 -0
  161. data/{lib/templates → templates/cli/utility}/storage/s3 +0 -2
  162. data/templates/cli/utility/storage/scp +11 -0
  163. data/templates/cli/utility/storage/sftp +11 -0
  164. data/{lib/templates → templates/cli/utility}/syncer/rsync +1 -1
  165. data/{lib/templates → templates/cli/utility}/syncer/s3 +1 -1
  166. data/templates/general/links +11 -0
  167. data/templates/general/version.erb +2 -0
  168. data/templates/notifier/mail/failure.erb +9 -0
  169. data/templates/notifier/mail/success.erb +7 -0
  170. data/templates/notifier/mail/warning.erb +9 -0
  171. data/templates/storage/dropbox/authorization_url.erb +6 -0
  172. data/templates/storage/dropbox/authorized.erb +4 -0
  173. data/templates/storage/dropbox/cache_file_written.erb +10 -0
  174. metadata +81 -45
  175. data/lib/backup/cli.rb +0 -110
  176. data/lib/backup/exception/command_failed.rb +0 -8
  177. data/lib/backup/exception/command_not_found.rb +0 -8
  178. data/lib/backup/notifier/binder.rb +0 -32
  179. data/lib/backup/notifier/templates/notify_failure.erb +0 -33
  180. data/lib/backup/notifier/templates/notify_success.erb +0 -16
  181. data/lib/templates/archive +0 -7
  182. data/lib/templates/encryptor/openssl +0 -8
  183. data/lib/templates/readme +0 -15
  184. data/lib/templates/storage/cloudfiles +0 -11
  185. data/lib/templates/storage/local +0 -7
  186. data/lib/templates/storage/rsync +0 -11
  187. data/lib/templates/storage/scp +0 -11
  188. data/lib/templates/storage/sftp +0 -11
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- require File.dirname(__FILE__) + '/../spec_helper'
3
+ require File.expand_path('../../spec_helper.rb', __FILE__)
4
4
 
5
5
  describe Backup::Syncer::RSync do
6
6
 
@@ -176,7 +176,7 @@ describe Backup::Syncer::RSync do
176
176
  Backup::Logger.expects(:message).with("Backup::Syncer::RSync started syncing '/some/random/directory' '/another/random/directory'.")
177
177
  rsync.expects(:utility).with(:rsync).returns(:rsync)
178
178
  rsync.expects(:remove_password_file!)
179
- rsync.expects(:run).with("rsync -vhP --archive --delete --compress -e 'ssh -p 22' --password-file='#{rsync.instance_variable_get('@password_file').path}' " +
179
+ rsync.expects(:run).with("rsync --archive --delete --compress -e 'ssh -p 22' --password-file='#{rsync.instance_variable_get('@password_file').path}' " +
180
180
  "'/some/random/directory' '/another/random/directory' 'my_username@123.45.678.90:backups/'")
181
181
  rsync.perform!
182
182
  end
@@ -186,7 +186,7 @@ describe Backup::Syncer::RSync do
186
186
  rsync.password = nil
187
187
  rsync.expects(:utility).with(:rsync).returns(:rsync)
188
188
  rsync.expects(:remove_password_file!)
189
- rsync.expects(:run).with("rsync -vhP --archive --delete --compress -e 'ssh -p 22' " +
189
+ rsync.expects(:run).with("rsync --archive --delete --compress -e 'ssh -p 22' " +
190
190
  "'/some/random/directory' '/another/random/directory' 'my_username@123.45.678.90:backups/'")
191
191
  rsync.perform!
192
192
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- require File.dirname(__FILE__) + '/../spec_helper'
3
+ require File.expand_path('../../spec_helper.rb', __FILE__)
4
4
 
5
5
  describe Backup::Syncer::S3 do
6
6
 
data/spec/version_spec.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- require File.dirname(__FILE__) + '/spec_helper'
3
+ require File.expand_path('../spec_helper.rb', __FILE__)
4
4
 
5
5
  def set_version(major, minor, patch)
6
6
  Backup::Version.stubs(:major).returns(major)
@@ -0,0 +1,13 @@
1
+ ##
2
+ # Archive [Archive]
3
+ #
4
+ archive :my_archive do |archive|
5
+ # add a file
6
+ archive.add '/path/to/a/file.rb'
7
+ # add a folder (including sub-folders)
8
+ archive.add '/path/to/a/folder/'
9
+ # exclude a file
10
+ archive.exclude '/path/to/a/excluded_file.rb'
11
+ # exclude a folder (including sub-folders)
12
+ archive.exclude '/path/to/a/excluded_folder/'
13
+ end
@@ -4,4 +4,4 @@
4
4
  compress_with Bzip2 do |compression|
5
5
  compression.best = true
6
6
  compression.fast = false
7
- end
7
+ end
@@ -4,4 +4,4 @@
4
4
  compress_with Gzip do |compression|
5
5
  compression.best = true
6
6
  compression.fast = false
7
- end
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(Backup::CONFIG_FILE), "models", "*.rb")].each do |model|
30
+ instance_eval(File.read(model))
31
+ end
@@ -11,4 +11,4 @@
11
11
  db.only_collections = ['only', 'these' 'collections']
12
12
  db.additional_options = []
13
13
  db.lock = false
14
- end
14
+ end
@@ -11,4 +11,4 @@
11
11
  db.skip_tables = ['skip', 'these', 'tables']
12
12
  db.only_tables = ['only', 'these' 'tables']
13
13
  db.additional_options = ['--quick', '--single-transaction']
14
- end
14
+ end
@@ -11,4 +11,4 @@
11
11
  db.skip_tables = ['skip', 'these', 'tables']
12
12
  db.only_tables = ['only', 'these' 'tables']
13
13
  db.additional_options = ['-xc', '-E=utf8']
14
- end
14
+ end
@@ -10,4 +10,4 @@
10
10
  db.socket = "/tmp/redis.sock"
11
11
  db.additional_options = []
12
12
  db.invoke_save = true
13
- end
13
+ end
@@ -0,0 +1,8 @@
1
+ ##
2
+ # Riak [Database]
3
+ #
4
+ database Riak do |db|
5
+ db.name = "hostname"
6
+ db.node = "riak@hostname"
7
+ db.cookie = "cookie"
8
+ end
@@ -9,4 +9,4 @@
9
9
  <Your GPG Public Key Here>
10
10
  -----END PGP PUBLIC KEY BLOCK-----
11
11
  KEY
12
- end
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
@@ -3,9 +3,10 @@
3
3
  #
4
4
  notify_by Campfire do |campfire|
5
5
  campfire.on_success = true
6
+ campfire.on_warning = true
6
7
  campfire.on_failure = true
7
8
 
8
9
  campfire.api_token = 'my_api_authentication_token'
9
10
  campfire.subdomain = 'my_subdomain'
10
11
  campfire.room_id = 'my_room_id'
11
- end
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
@@ -1,8 +1,13 @@
1
1
  ##
2
2
  # Mail [Notifier]
3
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
+ #
4
8
  notify_by Mail do |mail|
5
9
  mail.on_success = true
10
+ mail.on_warning = true
6
11
  mail.on_failure = true
7
12
 
8
13
  mail.from = 'sender@email.com'
@@ -14,4 +19,4 @@
14
19
  mail.password = 'my_password'
15
20
  mail.authentication = 'plain'
16
21
  mail.enable_starttls_auto = true
17
- end
22
+ end
@@ -3,6 +3,7 @@
3
3
  #
4
4
  notify_by Presently do |presently|
5
5
  presently.on_success = true
6
+ presently.on_warning = true
6
7
  presently.on_failure = true
7
8
 
8
9
  presently.subdomain = 'my_subdomain'
@@ -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
@@ -3,10 +3,11 @@
3
3
  #
4
4
  notify_by Twitter do |tweet|
5
5
  tweet.on_success = true
6
+ tweet.on_warning = true
6
7
  tweet.on_failure = true
7
8
 
8
9
  tweet.consumer_key = 'my_consumer_key'
9
10
  tweet.consumer_secret = 'my_consumer_secret'
10
11
  tweet.oauth_token = 'my_oauth_token'
11
12
  tweet.oauth_token_secret = 'my_oauth_token_secret'
12
- end
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,12 @@
1
+ ##
2
+ # Rackspace Cloud Files [Storage]
3
+ #
4
+ store_with CloudFiles do |cf|
5
+ cf.api_key = 'my_api_key'
6
+ cf.username = 'my_username'
7
+ cf.container = 'my_container'
8
+ cf.path = '/path/to/my/backups'
9
+ cf.keep = 5
10
+ cf.auth_url = 'lon.auth.api.rackspacecloud.com'
11
+ cf.servicenet = false
12
+ end
@@ -9,4 +9,4 @@
9
9
  db.timeout = 300
10
10
  db.path = '/path/to/my/backups'
11
11
  db.keep = 25
12
- end
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
@@ -6,4 +6,4 @@
6
6
  nf.storage_secret = 'my_storage_secret'
7
7
  nf.path = '/path/to/my/backups'
8
8
  nf.keep = 10
9
- end
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
@@ -17,5 +17,3 @@
17
17
  s3.path = '/path/to/my/backups'
18
18
  s3.keep = 10
19
19
  end
20
-
21
-
@@ -0,0 +1,11 @@
1
+ ##
2
+ # SCP (Secure Copy) [Storage]
3
+ #
4
+ store_with SCP 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.keep = 5
11
+ end
@@ -0,0 +1,11 @@
1
+ ##
2
+ # SFTP (Secure File Transfer Protocol) [Storage]
3
+ #
4
+ store_with SFTP 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.keep = 5
11
+ end
@@ -14,4 +14,4 @@
14
14
  directory.add "/var/apps/my_app/public/uploads"
15
15
  directory.add "/var/apps/my_app/logs"
16
16
  end
17
- end
17
+ end
@@ -12,4 +12,4 @@
12
12
  directory.add "/path/to/directory/to/sync"
13
13
  directory.add "/path/to/other/directory/to/sync"
14
14
  end
15
- end
15
+ end
@@ -0,0 +1,11 @@
1
+ Backup's Ruby Gem releases:
2
+ http://rubygems.org/gems/backup
3
+
4
+ Backup's Git repository:
5
+ https://github.com/meskyanichi/backup
6
+
7
+ Backup's Issue Tracker:
8
+ https://github.com/meskyanichi/backup/issues
9
+
10
+ Backup's Wikipedia/Documentation/Guides:
11
+ https://github.com/meskyanichi/backup/wiki
@@ -0,0 +1,2 @@
1
+ Backup version <%= Backup::Version.current %>
2
+ Ruby version <%= RUBY_DESCRIPTION %>
@@ -0,0 +1,9 @@
1
+
2
+ Backup <%= @model.label %> (<%= @model.trigger %>) Failed!
3
+
4
+ See the attached backup log for details.
5
+
6
+ ===========================================================================
7
+ <%= Backup::Template.new.result("general/version.erb") %>
8
+
9
+ <%= Backup::Template.new.result("general/links") %>
@@ -0,0 +1,7 @@
1
+
2
+ Backup <%= @model.label %> (<%= @model.trigger %>) finished without any errors!
3
+
4
+ ===========================================================================
5
+ <%= Backup::Template.new.result("general/version.erb") %>
6
+
7
+ <%= Backup::Template.new.result("general/links") %>
@@ -0,0 +1,9 @@
1
+
2
+ Backup <%= @model.label %> (<%= @model.trigger %>) finished with warnings.
3
+
4
+ See the attached backup log for details.
5
+
6
+ ===========================================================================
7
+ <%= Backup::Template.new.result("general/version.erb") %>
8
+
9
+ <%= Backup::Template.new.result("general/links") %>