Files
ansible/templates/borgmatic-system.yaml
Bart Sjerps ee8ca96a7b update
2026-07-20 11:20:51 +02:00

54 lines
1.1 KiB
YAML

constants:
user: borg
local: {{ ansible_hostname }}
remote: atc-backup.dell-atc.lan
base: /var/borg
source_directories:
- /etc
- /home
- /usr/local
- /opt
- /root
- /var/backups
- /var/log
- /var/opt
- /srv
{% if 'docker' in group_names -%}
- /var/lib/docker/volumes/
{% endif -%}
{% if 'webservers' in group_names -%}
- /var/www
{% endif -%}
{% if 'mailservers' in group_names -%}
- /var/dovecot
{% endif %}
repositories:
- path: ssh://{user}@{remote}{base}/{local}
label: system
exclude_from:
- /etc/borgmatic/excludes
color: false
ssh_command: ssh -i /etc/borgmatic/borg_key -oBatchMode=yes -o StrictHostKeychecking=no
archive_name_format: 'system-{now:%Y-%m-%d_%H%M}'
# borg_base_directory: /path/to/base
# $borg_base_directory/.config/borg
# borg_config_directory: /path/to/base/config
# $borg_base_directory/.cache/borg
# borg_cache_directory: /path/to/base/cache
# keep_within: 3H
# keep_secondly: 60
# keep_minutely: 60
# keep_hourly: 24
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
keep_yearly: 1