mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2024-12-21 19:09:37 +01:00
fix borgmatic removal of config-sections
This commit is contained in:
parent
cbe280e7ff
commit
796aebad03
@ -3,7 +3,7 @@
|
|||||||
# 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,14 +16,6 @@ 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 }}
|
||||||
repositories:
|
|
||||||
{% if borg_repository is iterable and (borg_repository is not string and borg_repository is not mapping) %}
|
|
||||||
{% for repo in borg_repository %}
|
|
||||||
- {{ repo }}
|
|
||||||
{% endfor %}
|
|
||||||
{% elif borg_repository is defined and borg_repository is string %}
|
|
||||||
- {{ borg_repository }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# Store atime into archive.
|
# Store atime into archive.
|
||||||
atime: {{ borgmatic_store_atime }}
|
atime: {{ borgmatic_store_atime }}
|
||||||
@ -31,6 +23,15 @@ location:
|
|||||||
# Store ctime into archive.
|
# Store ctime into archive.
|
||||||
ctime: {{ borgmatic_store_ctime }}
|
ctime: {{ borgmatic_store_ctime }}
|
||||||
|
|
||||||
|
repositories:
|
||||||
|
{% if borg_repository is iterable and (borg_repository is not string and borg_repository is not mapping) %}
|
||||||
|
{% for repo in borg_repository %}
|
||||||
|
- path: {{ repo }}
|
||||||
|
{% endfor %}
|
||||||
|
{% elif borg_repository is defined and borg_repository is string %}
|
||||||
|
- path: {{ borg_repository }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if borg_exclude_patterns %}
|
{% if borg_exclude_patterns %}
|
||||||
# Any paths matching these patterns are excluded from backups. Globs and tildes
|
# Any paths matching these patterns are excluded from backups. Globs and tildes
|
||||||
# are expanded. See the output of "borg help patterns" for more details.
|
# are expanded. See the output of "borg help patterns" for more details.
|
||||||
@ -53,7 +54,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
|
||||||
@ -65,7 +67,6 @@ location:
|
|||||||
# https://borgbackup.readthedocs.io/en/stable/usage.html#borg-create and
|
# https://borgbackup.readthedocs.io/en/stable/usage.html#borg-create and
|
||||||
# https://borgbackup.readthedocs.io/en/stable/usage/general.html#environment-variables for
|
# https://borgbackup.readthedocs.io/en/stable/usage/general.html#environment-variables for
|
||||||
# details.
|
# details.
|
||||||
storage:
|
|
||||||
encryption_passphrase: {{ borg_encryption_passphrase }}
|
encryption_passphrase: {{ borg_encryption_passphrase }}
|
||||||
|
|
||||||
# The standard output of this command is used to unlock the encryption key. Only
|
# The standard output of this command is used to unlock the encryption key. Only
|
||||||
@ -113,7 +114,7 @@ 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 }}
|
||||||
@ -152,7 +153,7 @@ 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
|
||||||
@ -173,7 +174,7 @@ 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