Advertisement
Guest User

Untitled

a guest
Oct 31st, 2017
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.16 KB | None | 0 0
  1. # encoding: utf-8
  2.  
  3. ##
  4. # Backup Generated: database
  5. # Once configured, you can run the backup with the following command:
  6. #
  7. # $ backup perform -t database [-c <path_to_configuration_file>]
  8. #
  9. # For more information about Backup's components, see the documentation at:
  10. # http://backup.github.io/backup
  11. #
  12. Model.new(:database, 'Database Horowitz Real Estate (Admin panel)') do
  13.   ##
  14.   # Archive [Archive]
  15.   #
  16.   # Adding a file or directory (including sub-directories):
  17.   #   archive.add "/path/to/a/file.rb"
  18.   #   archive.add "/path/to/a/directory/"
  19.   #
  20.   # Excluding a file or directory (including sub-directories):
  21.   #   archive.exclude "/path/to/an/excluded_file.rb"
  22.   #   archive.exclude "/path/to/an/excluded_directory
  23.   #
  24.   # By default, relative paths will be relative to the directory
  25.   # where `backup perform` is executed, and they will be expanded
  26.   # to the root of the filesystem when added to the archive.
  27.   #
  28.   # If a `root` path is set, relative paths will be relative to the
  29.   # given `root` path and will not be expanded when added to the archive.
  30.   #
  31.   #   archive.root '/path/to/archive/root'
  32.   #
  33.   archive :my_archive do |archive|
  34.     # Run the `tar` command using `sudo`
  35.     # archive.use_sudo
  36.     # archive.add "/path/to/a/file.rb"
  37.     archive.add "/home/deploy/www/database-horowitzre"
  38.     # archive.exclude "/path/to/a/excluded_file.rb"
  39.     # archive.exclude "/path/to/a/excluded_folder"
  40.   end
  41.  
  42.   database PostgreSQL do |db|
  43.     # To dump all databases, set `db.name = :all` (or leave blank)
  44.     db.name               = "database_mighty_production"
  45.     db.username           = "dbhorowitzre"
  46.     db.password           = "FEu2qYkvfD2voZ"
  47.     db.host               = "localhost"
  48.     db.port               = 5432
  49.     # db.socket             = "/tmp/pg.sock"
  50.     # When dumping all databases, `skip_tables` and `only_tables` are ignored.
  51.     # db.skip_tables        = ['skip', 'these', 'tables']
  52.     # db.only_tables        = ['only', 'these' 'tables']
  53.     db.additional_options = []
  54.   end
  55.  
  56.   ##
  57.   # Amazon Simple Storage Service [Storage]
  58.   #
  59.   store_with S3 do |s3|
  60.     # AWS Credentials
  61.     s3.access_key_id     = "AKIAIYPDSERDENRGT65Q"
  62.     s3.secret_access_key = "O0LN0Dg17IT0DeFPMH/jZ4/FdJwZ3KR7fsAmH1gq"
  63.     # Or, to use a IAM Profile:
  64.     # s3.use_iam_profile = true
  65.  
  66.     s3.region            = "us-east-1"
  67.     s3.bucket            = "mighty-production-backups"
  68.     s3.path              = "/"
  69.     s3.keep              = 5
  70.     # s3.keep              = Time.now - 2592000 # Remove all backups older than 1 month.
  71.   end
  72.  
  73.   ##
  74.   # Gzip [Compressor]
  75.   #
  76.   compress_with Gzip
  77.  
  78.   ##
  79.   # Mail [Notifier]
  80.   #
  81.   # The default delivery method for Mail Notifiers is 'SMTP'.
  82.   # See the documentation for other delivery options.
  83.   #
  84.   # notify_by Mail do |mail|
  85.   #   mail.on_success           = true
  86.   #   mail.on_warning           = true
  87.   #   mail.on_failure           = true
  88.  
  89.   #   # mail.from                 = "sender@email.com"
  90.   #   # mail.to                   = "receiver@email.com"
  91.   #   # mail.cc                   = "cc@email.com"
  92.   #   # mail.bcc                  = "bcc@email.com"
  93.   #   # mail.reply_to             = "reply_to@email.com"
  94.   #   # mail.address              = "smtp.gmail.com"
  95.   #   # mail.port                 = 587
  96.   #   # mail.domain               = "your.host.name"
  97.   #   # mail.user_name            = "sender@email.com"
  98.   #   # mail.password             = "my_password"
  99.   #   # mail.authentication       = "plain"
  100.   #   # mail.encryption           = :starttls
  101.   # end
  102.  
  103.   notify_by Slack do |slack|
  104.     slack.on_success = true
  105.     slack.on_warning = true
  106.     slack.on_failure = true
  107.  
  108.     # The integration token
  109.     slack.webhook_url = 'https://hooks.slack.com/services/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'
  110.  
  111.     ##
  112.     # Optional
  113.     #
  114.     # The channel to which messages will be sent
  115.     slack.channel = 'notifications'
  116.     #
  117.     # The username to display along with the notification
  118.     slack.username = 'backup bot'
  119.     #
  120.     # The emoji icon to use for notifications.
  121.     # See http://www.emoji-cheat-sheet.com for a list of icons.
  122.     slack.icon_emoji = ':ambulance:'
  123.   end
  124.  
  125. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement