Sha256: d8eb5aaed62ab68b0b222cfd42f7452a5f2dd76aa1235ba8775cd73bc218415d

Contents?: true

Size: 1.45 KB

Versions: 2

Compression:

Stored size: 1.45 KB

Contents

Backup::Model.new(:<%= fetch(:application) %>, '<%= fetch(:application) %> backup') do
    ##
    # Split [Splitter]
    #
    # Split the backup file in to chunks of 250 megabytes
    # if the backup file size exceeds 250 megabytes
    #
    split_into_chunks_of 500

    ##
    # PostgreSQL [Database]
    #
    database PostgreSQL do |db|
        # To dump all databases, set `db.name = :all` (or leave blank)
        db.name               = "<%= "#{fetch(:postgresql_database)}_#{fetch(:rails_env)}" %>"
        db.username           = "<%= fetch(:postgresql_user) %>"
        db.password           = "<%= fetch(:postgresql_password) %>"
        db.host               = "<%= fetch(:postgresql_host) %>"
        db.port               = "<%= fetch(:postgresql_port) %>"
    end

    ##
    # Local (Copy) [Storage]
    #
    store_with Local do |local|
    local.path       = "~/backups/"
    local.keep       = 5
    end

    ##
    # Gzip [Compressor]
    #
    compress_with Gzip

    ##
    # Hipchat [Notifier]
    #
=begin
    notify_by Hipchat do |hipchat|
        hipchat.on_success      = true
        hipchat.on_warning      = true
        hipchat.on_failure      = true
        hipchat.token           = "change_token"
        hipchat.from            = "<%= fetch(:application) %> Backup"
        hipchat.rooms_notified  = ["backup"]
        hipchat.success_color   = "green"
        hipchat.warning_color   = "yellow"
        hipchat.failure_color   = "red"
    end
=end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
recipes_matic-1.2.1 lib/generators/recipes_matic/templates/config/deploy/recipes/templates/backup_model.erb
recipes_matic-1.2.0 lib/generators/recipes_matic/templates/config/deploy/recipes/templates/backup_model.erb