Guest User

Untitled

a guest
Oct 22nd, 2018
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. # encoding: utf-8
  2.  
  3. ##
  4. # Backup Generated: my_backup
  5.  
  6. Backup::Model.new(:my_backup, 'Description for my_backup') do
  7.  
  8. split_into_chunks_of 250
  9.  
  10. database MySQL do |db|
  11. # To dump all databases, set `db.name = :all` (or leave blank)
  12. db.name = :all
  13. db.username = "my_username"
  14. db.password = "my_password"
  15. db.host = "localhost"
  16. db.port = 3306
  17. db.socket = "/var/run/mysqld/mysqld.sock"
  18. #db.skip_tables = ["skip", "these", "tables"]
  19. #db.only_tables = ["only", "these" "tables"]
  20. db.additional_options = ["--quick", "--single-transaction"]
  21. end
  22.  
  23. store_with RSync do |server|
  24. # server.username = 'my_username'
  25. # server.password = 'my_password'
  26. # server.ip = '123.45.678.90'
  27. # server.port = 22
  28. server.path = '~/backups/'
  29. server.local = true
  30. end
  31.  
  32. compress_with Gzip
  33.  
  34. notify_by Mail do |mail|
  35. mail.on_success = true
  36. mail.on_warning = true
  37. mail.on_failure = true
  38.  
  39. mail.from = "sender@email.com"
  40. mail.to = "receiver@email.com"
  41. mail.address = "smtp.gmail.com"
  42. mail.port = 587
  43. mail.domain = "your.host.name"
  44. mail.user_name = "sender@email.com"
  45. mail.password = "my_password"
  46. mail.authentication = "plain"
  47. mail.enable_starttls_auto = true
  48. end
  49.  
  50. end
Add Comment
Please, Sign In to add comment