You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/roles/borgbackup_client/templates/config.yaml.j2

50 lines
1.0 KiB
Django/Jinja

---
{{ ansible_managed | comment }}
location:
source_directories:
{% for source in borg_backup_directories %}
- {{ source }}
{% endfor %}
exclude_patterns:
{% for exclude in borg_backup_exclude %}
- {{ exclude }}
{% endfor %}
repositories:
- {{ borg_server_user }}@{{ borg_server_host }}:{{ borg_host_dir }}
storage:
encryption_passphrase: "{{ borg_encryption_passphrase }}"
ssh_command: ssh -i /etc/borgmatic/id_remote
# compression: 'lz4'
# umask: 0077
# lock_wait: 5
# archive_name_format: '{hostname}-{now}'
retention:
{% if borg_keep_hourly > 0 %}
- keep_hourly: {{ borg_keep_hourly }}
{% endif %}
{% if borg_keep_daily > 0 %}
- keep_hourly: {{ borg_keep_daily }}
{% endif %}
{% if borg_keep_weekly > 0 %}
- keep_hourly: {{ borg_keep_weekly }}
{% endif %}
{% if borg_keep_monthly > 0 %}
- keep_hourly: {{ borg_keep_monthly }}
{% endif %}
consistency:
checks:
- repository
- archives
{% if postgresql_databases is defined %}
hooks:
postgresql_databases:
- name: all
{% endif %}
...