Files
ansible/templates/borgmatic-system.yaml
T

54 lines
1.1 KiB
YAML
Raw Normal View History

2026-06-28 16:39:16 +02:00
constants:
2026-07-20 11:20:51 +02:00
user: borg
local: {{ ansible_hostname }}
2026-06-28 16:39:16 +02:00
remote: atc-backup.dell-atc.lan
base: /var/borg
source_directories:
- /etc
- /home
- /usr/local
- /opt
2026-07-10 10:04:17 +02:00
- /root
2026-06-28 16:39:16 +02:00
- /var/backups
- /var/log
- /var/opt
2026-06-28 21:32:23 +02:00
- /srv
2026-06-28 16:39:16 +02:00
{% 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