location: source_directories: {% for dir in backup_include|default([]) %} - {{ dir }} {% endfor %} {% for drupal in drupal_settings|default([]) %} {% if drupal.jail is defined and drupal.mountpoints is not defined %} - {{ jailroot|default('/jails') }}/{{ drupal.jail.name }}/var/www/files {% endif %} {% endfor %} {% if groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql'] %} - /var/backups/mysql {% endif %} repositories: - /var/backups/borg exclude_patterns: - '*.pyc' - '*/.git' - '*/.svn' - '*/vendor/*' - '*/node_modules/*' storage: encryption_passphrase: '{{ borgbackup.passphrase }}' retention: keep_daily: 7 keep_weekly: 8 keep_monthly: 12 keep_yearly: 30 consistency: checks: - repository - archives hooks: on_error: - /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 }} '{"resource":"Borg Backup"}'