Guest User

Untitled

a guest
Jan 22nd, 2018
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. Backup::Model.new(:backup_name, 'Description') do
  2.  
  3. ##
  4. # PostgreSQL [Database]
  5. #
  6. database PostgreSQL do |db|
  7. db.name = "db_name"
  8. db.username = "username"
  9. db.password = "password"
  10. db.host = "host"
  11. db.port = 5432
  12. db.additional_options = ['-xc', '-E=utf8']
  13. end
  14.  
  15. ##
  16. # Dropbox File Hosting Service [Storage]
  17. #
  18. store_with Dropbox do |db|
  19. db.api_key = 'key'
  20. db.api_secret = 'secret'
  21. db.timeout = 300
  22. db.path = '/backups/path'
  23. db.keep = 25
  24. end
  25.  
  26. ##
  27. # FTP [Storage]
  28. #
  29.  
  30. store_with FTP do |server|
  31. server.username = 'username'
  32. server.password = 'password'
  33. server.ip = '127.0.0.1'
  34. server.port = 21
  35. server.path = '/backups/path'
  36. server.keep = 5
  37. end
  38.  
  39. ##
  40. # OpenSSL [Encryptor]
  41. #
  42. encrypt_with OpenSSL do |encryption|
  43. encryption.password = 'password'
  44. encryption.base64 = true
  45. encryption.salt = true
  46. end
  47.  
  48. ##
  49. # Gzip [Compressor]
  50. #
  51. compress_with Gzip do |compression|
  52. compression.best = true
  53. compression.fast = false
  54. end
  55.  
  56. ##
  57. # Mail [Notifier]
  58. #
  59. notify_by Mail do |mail|
  60. mail.on_success = true
  61. mail.on_failure = true
  62.  
  63. mail.from = 'btstorti@gmail.com'
  64. mail.to = 'btstorti@gmail.com'
  65. mail.address = 'smtp.gmail.com'
  66. mail.port = 587
  67. mail.domain = 'gmail.com'
  68. mail.user_name = 'btstorti@gmail.com'
  69. mail.password = 'password'
  70. mail.authentication = 'plain'
  71. mail.enable_starttls_auto = true
  72. end
  73.  
  74. end
Add Comment
Please, Sign In to add comment