This commit is contained in:
parent
84b0030581
commit
b623f24c43
@ -3,7 +3,6 @@
|
|||||||
# Managed by Ansible, please don't edit manually
|
# Managed by Ansible, please don't edit manually
|
||||||
|
|
||||||
# Full config: https://torsion.org/borgmatic/docs/reference/config.yaml
|
# Full config: https://torsion.org/borgmatic/docs/reference/config.yaml
|
||||||
location:
|
|
||||||
{% if borg_source_directories is not defined or borg_source_directories | length == 0 %}
|
{% if borg_source_directories is not defined or borg_source_directories | length == 0 %}
|
||||||
source_directories:
|
source_directories:
|
||||||
- /etc/hostname # prevent empty backupconfig
|
- /etc/hostname # prevent empty backupconfig
|
||||||
@ -16,13 +15,28 @@ location:
|
|||||||
|
|
||||||
# Stay in same file system (do not cross mount points).
|
# Stay in same file system (do not cross mount points).
|
||||||
one_file_system: {{ borg_one_file_system }}
|
one_file_system: {{ borg_one_file_system }}
|
||||||
|
|
||||||
|
{# List of... #}
|
||||||
repositories:
|
repositories:
|
||||||
{% if borg_repository is iterable and (borg_repository is not string and borg_repository is not mapping) %}
|
{% if borg_repository is iterable and (borg_repository is not string and borg_repository is not mapping) %}
|
||||||
{% for repo in borg_repository %}
|
{% for repo in borg_repository %}
|
||||||
- {{ repo }}
|
{# ...mappings #}
|
||||||
|
{% if repo is mapping and "path" in repo and "label" in repo %}
|
||||||
|
{{ [repo] | to_nice_yaml(indent=2) | trim | indent(4) }}
|
||||||
|
{# ...strings (legacy) #}
|
||||||
|
{% elif repo is string %}
|
||||||
|
- path: {{ repo }}
|
||||||
|
label: {{ repo }}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{# Mapping with path and label key #}
|
||||||
|
{% elif borg_repository is defined and borg_repository is mapping and "path" in borg_repository and "label" in borg_repository %}
|
||||||
|
- path: {{ borg_repository.path }}
|
||||||
|
label: {{ borg_repository.label }}
|
||||||
|
{# String (legacy) #}
|
||||||
{% elif borg_repository is defined and borg_repository is string %}
|
{% elif borg_repository is defined and borg_repository is string %}
|
||||||
- {{ borg_repository }}
|
- path: {{ borg_repository }}
|
||||||
|
label: {{ borg_repository }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Store atime into archive.
|
# Store atime into archive.
|
||||||
@ -53,7 +67,8 @@ location:
|
|||||||
exclude_caches: true
|
exclude_caches: true
|
||||||
|
|
||||||
# Exclude directories that contain a file with the given filename.
|
# Exclude directories that contain a file with the given filename.
|
||||||
exclude_if_present: .nobackup
|
exclude_if_present:
|
||||||
|
- .nobackup
|
||||||
|
|
||||||
# Alternate Borg remote executable. Defaults to "borg".
|
# Alternate Borg remote executable. Defaults to "borg".
|
||||||
# remote_path: borg1
|
# remote_path: borg1
|
||||||
@ -115,7 +130,6 @@ storage:
|
|||||||
# Retention policy for how many backups to keep in each category. See
|
# Retention policy for how many backups to keep in each category. See
|
||||||
# https://borgbackup.readthedocs.org/en/stable/usage.html#borg-prune for details.
|
# https://borgbackup.readthedocs.org/en/stable/usage.html#borg-prune for details.
|
||||||
# At least one of the "keep" options is required for pruning to work.
|
# At least one of the "keep" options is required for pruning to work.
|
||||||
retention:
|
|
||||||
{% if borg_retention_policy.keep_secondly is defined %}
|
{% if borg_retention_policy.keep_secondly is defined %}
|
||||||
# Number of secondly archives to keep.
|
# Number of secondly archives to keep.
|
||||||
keep_secondly: {{ borg_retention_policy.keep_secondly }}
|
keep_secondly: {{ borg_retention_policy.keep_secondly }}
|
||||||
@ -154,7 +168,6 @@ retention:
|
|||||||
# Consistency checks to run after backups. See
|
# Consistency checks to run after backups. See
|
||||||
# https://borgbackup.readthedocs.org/en/stable/usage.html#borg-check and
|
# https://borgbackup.readthedocs.org/en/stable/usage.html#borg-check and
|
||||||
# https://borgbackup.readthedocs.org/en/stable/usage.html#borg-extract for details.
|
# https://borgbackup.readthedocs.org/en/stable/usage.html#borg-extract for details.
|
||||||
consistency:
|
|
||||||
# List of one or more consistency checks to run: "repository",
|
# List of one or more consistency checks to run: "repository",
|
||||||
# "archives", "data", and/or "extract". Defaults to
|
# "archives", "data", and/or "extract". Defaults to
|
||||||
# "repository" and "archives". Set to "disabled" to disable
|
# "repository" and "archives". Set to "disabled" to disable
|
||||||
@ -175,7 +188,6 @@ consistency:
|
|||||||
# IMPORTANT: All provided commands and scripts are executed with user permissions of borgmatic.
|
# IMPORTANT: All provided commands and scripts are executed with user permissions of borgmatic.
|
||||||
# Do not forget to set secure permissions on this file as well as on any script listed (chmod 0700) to
|
# Do not forget to set secure permissions on this file as well as on any script listed (chmod 0700) to
|
||||||
# prevent potential shell injection or privilege escalation.
|
# prevent potential shell injection or privilege escalation.
|
||||||
hooks:
|
|
||||||
{% for hook in borgmatic_hooks %}
|
{% for hook in borgmatic_hooks %}
|
||||||
{{ hook }}:
|
{{ hook }}:
|
||||||
{{ borgmatic_hooks[hook] | to_nice_yaml(indent=2) | trim | indent(8) }}
|
{{ borgmatic_hooks[hook] | to_nice_yaml(indent=2) | trim | indent(8) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user