Files
2025-03-31 03:15:14 +03:00

36 lines
952 B
Django/Jinja

# {{ ansible_managed }}
# vim:ft=yaml
source_directories:
{{ borgmatic_config_directories | to_nice_yaml }}
repositories:
{% for target in borgmatic_config_targets %}
{% for directory in target.directories %}
- path: "ssh://{{ hostvars[target.host].ansible_user_id }}@{{ target.host }}/{{ directory }}/{{ ansible_fqdn }}/{{ borgmatic_config_name }}"
{% endfor %}
{% endfor %}
working_directory: "~"
one_file_system: true
exclude_patterns:
- /var/cache
exclude_caches: true
exclude_if_present:
- .nobackup
keep_exclude_tags: true
source_directories_must_exist: true
compression: zstd
encryption_passphrase: "{{ borgmatic_config_encryption_passphrase }}"
ssh_command: ssh -i ~/.ssh/id_ed25519_borg
keep_within: 48H
keep_hourly: 168
keep_daily: 30
keep_weekly: 26
keep_monthly: {{ (borgmatic_config_keep_backups_months / 2) | round(0, 'ceil') | int }}
keep_yearly: {{ (borgmatic_config_keep_backups_months / 12) | round(0, 'ceil') | int }}