ansible-role-backup-client/templates/backup-check.j2
2021-08-18 12:49:33 +01:00

15 lines
314 B
Django/Jinja
Executable file

#!/bin/bash
set -euo pipefail
{% if backup_backend == 'restic' %}
# restic backend
source /etc/backup-client/restic.env
restic check --read-data \
--cleanup-cache{% if not backup_restic_cache %} --no-cache{% endif %}
{% endif %}
{% if not backup_backend %}
echo "Noop, backup is handled external"
{% endif %}