Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
location:
source_directories:
- /mnt/source
repositories:
- /mnt/borg-repository
{% if application_remote_repo %}
- {{ application_remote_repo }}
{% endif %}
one_file_system: true
exclude_patterns:
- '*.log'
- '*.pyc'
- '*/.git'
- '*/.svn'
- '*/vendor/*'
- '*/node_modules/*'
exclude_caches: true
exclude_if_present: '.nobackup'
storage:
encryption_passphrase: '{{ borg_passphrase }}'
retries: {{ borgbackup.retries|default(1) }}
retry_wait: 300
retention:
keep_daily: 7
keep_weekly: 8
keep_monthly: 12
keep_yearly: 30
consistency:
checks:
- repository
- archives
hooks:
before_backup:
- echo "`date` - Starting backup"
after_backup:
- echo "`date` - Finished backup"
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 }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'