Skip to content
Snippets Groups Projects
application.yaml 1.59 KiB
Newer Older
  • Learn to ignore specific revisions
  • location:
        source_directories:
    
    jurgenhaas's avatar
    jurgenhaas committed
    {% if application_mountpoints|default(false) %}
    
    jurgenhaas's avatar
    jurgenhaas committed
    {% for mountpoint in application_mountpoints %}
            - {{ mountpoint.path }}
    {% endfor %}
    {% else %}
    
            - {{ application_dir }}
    
    jurgenhaas's avatar
    jurgenhaas committed
    {% endif %}
    
    {% if not application_disable_local %}
    
            - /var/backups/borg/{{ application }}_{{ application_id }}
    
    {% endif %}
    
    {% if application_remote_repo %}
            - {{ application_remote_repo }}
    {% endif %}
    
        one_file_system: true
    
    jurgenhaas's avatar
    jurgenhaas committed
            - '*.log'
    
            - '*.pyc'
            - '*/.git'
            - '*/.svn'
            - '*/vendor/*'
            - '*/node_modules/*'
    
        exclude_caches: true
    
        exclude_if_present: '.nobackup'
    
    storage:
        encryption_passphrase: '{{ borgbackup.passphrase }}'
    
        retries: {{ borgbackup.retries|default(1) }}
    
    jurgenhaas's avatar
    jurgenhaas committed
        retry_wait: 300
    
    retention:
        keep_daily: 7
        keep_weekly: 8
        keep_monthly: 12
        keep_yearly: 30
    consistency:
        checks:
    
        before_backup:
            - echo "`date` - Starting backup"
        after_backup:
            - echo "`date` - Finished backup"
    
            - /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'