disable cache for local repos
This commit is contained in:
parent
eed938b1b1
commit
f0a5477790
5 changed files with 6 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
backup_backend: "{% if backups.mode in ['standalone-restic', 'hypervisor-restic'] %}restic{% else %}False{% endif %}"
|
backup_backend: "{% if backups.mode in ['standalone-restic', 'hypervisor-restic'] %}restic{% else %}False{% endif %}"
|
||||||
backup_executor: "{% if backups.mode in ['vm-via-hypervisor'] %}False{% else %}True{% endif %}"
|
backup_executor: "{% if backups.mode in ['vm-via-hypervisor'] %}False{% else %}True{% endif %}"
|
||||||
|
backup_restic_cache: "{% if backups.backends.restic.repo_type == 'local' %}False{% else %}True{% endif %}"
|
||||||
|
|
||||||
- name: create config folder
|
- name: create config folder
|
||||||
file:
|
file:
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ set -euo pipefail
|
||||||
# restic backend
|
# restic backend
|
||||||
source /etc/backup-client/restic.env
|
source /etc/backup-client/restic.env
|
||||||
|
|
||||||
restic check --read-data --cleanup-cache
|
restic check --read-data \
|
||||||
|
--cleanup-cache{% if not backup_restic_cache %} --no-cache{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ source /etc/backup-client/retention.env
|
||||||
# restic backend
|
# restic backend
|
||||||
source /etc/backup-client/restic.env
|
source /etc/backup-client/restic.env
|
||||||
restic forget \
|
restic forget \
|
||||||
--cleanup-cache \
|
--cleanup-cache {% if not backup_restic_cache %} --no-cache{% endif %} \
|
||||||
--verbose \
|
--verbose \
|
||||||
--prune \
|
--prune \
|
||||||
--group-by "host,paths,tags" \
|
--group-by "host,paths,tags" \
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ test -f "/etc/backup-client/enabled" || { echo "Standalone backup is disabled";
|
||||||
source /etc/backup-client/restic.env
|
source /etc/backup-client/restic.env
|
||||||
|
|
||||||
restic backup \
|
restic backup \
|
||||||
|
--cleanup-cache {% if not backup_restic_cache %} --no-cache{% endif %} \
|
||||||
--verbose \
|
--verbose \
|
||||||
--exclude-caches \
|
--exclude-caches \
|
||||||
--one-file-system \
|
--one-file-system \
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ set -euo pipefail
|
||||||
# restic backend
|
# restic backend
|
||||||
source /etc/backup-client/restic.env
|
source /etc/backup-client/restic.env
|
||||||
restic backup \
|
restic backup \
|
||||||
|
--cleanup-cache {% if not backup_restic_cache %} --no-cache{% endif %} \
|
||||||
--verbose \
|
--verbose \
|
||||||
--host "$DOMAIN" \
|
--host "$DOMAIN" \
|
||||||
--exclude-file "/etc/backup-client/vms/$DOMAIN/exclude_files" \
|
--exclude-file "/etc/backup-client/vms/$DOMAIN/exclude_files" \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue