2022-04-05 11:37:27 +00:00
|
|
|
#jinja2: lstrip_blocks: "True", trim_blocks: "True"
|
|
|
|
|
|
|
|
location:
|
|
|
|
source_directories: {{ matrix_backup_borg_location_source_directories|to_json }}
|
|
|
|
repositories: {{ matrix_backup_borg_location_repositories|to_json }}
|
|
|
|
one_file_system: true
|
|
|
|
exclude_patterns: {{ matrix_backup_borg_location_exclude_patterns|to_json }}
|
|
|
|
|
|
|
|
storage:
|
2022-04-15 16:38:10 +00:00
|
|
|
compression: {{ matrix_backup_borg_storage_compression|to_json }}
|
|
|
|
ssh_command: {{ matrix_backup_borg_storage_ssh_command|to_json }}
|
|
|
|
archive_name_format: {{ matrix_backup_borg_storage_archive_name_format|to_json }}
|
|
|
|
encryption_passphrase: {{ matrix_backup_borg_storage_encryption_passphrase|to_json }}
|
2022-04-18 11:48:37 +00:00
|
|
|
unknown_unencrypted_repo_access_is_ok: {{ matrix_backup_borg_unknown_unencrypted_repo_access_is_ok|to_json }}
|
2022-04-05 11:37:27 +00:00
|
|
|
|
|
|
|
retention:
|
2022-04-15 16:38:10 +00:00
|
|
|
keep_hourly: {{ matrix_backup_borg_retention_keep_hourly|to_json }}
|
|
|
|
keep_daily: {{ matrix_backup_borg_retention_keep_daily|to_json }}
|
|
|
|
keep_weekly: {{ matrix_backup_borg_retention_keep_weekly|to_json }}
|
|
|
|
keep_monthly: {{ matrix_backup_borg_retention_keep_monthly|to_json }}
|
|
|
|
keep_yearly: {{ matrix_backup_borg_retention_keep_yearly|to_json }}
|
|
|
|
prefix: {{ matrix_backup_borg_retention_prefix|to_json }}
|
2022-04-05 11:37:27 +00:00
|
|
|
|
|
|
|
consistency:
|
|
|
|
checks:
|
|
|
|
- repository
|
|
|
|
- archives
|
|
|
|
|
|
|
|
hooks:
|
2022-04-15 16:38:10 +00:00
|
|
|
{% if matrix_backup_borg_postgresql_enabled and matrix_backup_borg_postgresql_databases|length > 0 %}
|
2022-04-14 15:06:54 +00:00
|
|
|
postgresql_databases:
|
|
|
|
{% for database in matrix_backup_borg_postgresql_databases %}
|
2022-04-15 16:38:10 +00:00
|
|
|
- name: {{ database|to_json }}
|
|
|
|
hostname: {{ matrix_backup_borg_postgresql_databases_hostname|to_json }}
|
|
|
|
username: {{ matrix_backup_borg_postgresql_databases_username|to_json }}
|
|
|
|
password: {{ matrix_backup_borg_postgresql_databases_password|to_json }}
|
2022-12-05 12:42:02 +00:00
|
|
|
port: {{ matrix_backup_borg_postgresql_databases_port | int | to_json }}
|
2022-04-14 15:06:54 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2022-04-05 11:37:27 +00:00
|
|
|
after_backup:
|
|
|
|
- echo "Backup created."
|
|
|
|
on_error:
|
|
|
|
- echo "Error while creating a backup."
|