From 6e35cc7cec4de116dae27418644217248a681d65 Mon Sep 17 00:00:00 2001 From: camille Date: Fri, 30 Jun 2023 16:14:51 +0200 Subject: [PATCH] duplicity - add check script typo --- templates/check_duplicity.sh.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/check_duplicity.sh.j2 b/templates/check_duplicity.sh.j2 index adeb0aa..0ab7070 100644 --- a/templates/check_duplicity.sh.j2 +++ b/templates/check_duplicity.sh.j2 @@ -2,7 +2,11 @@ # Check if backup of the day is present currenttime=$(date +%H:%M) if [[ "$currenttime" > "09:00" ]] || [[ "$currenttime" < "23:59" ]]; then - source /etc/duplicity/duplicity.cnf && duplicity collection-status --name {{ duplicity_backup_name }} --archive-dir={{ duplicity_archive_dir }} "{{ duplicity_azure_path }}" |grep 'Full\|Incremental' |grep -i "$(date +"%a %b %d")" |wc -l +{% if 's3' in duplicity_backend -%} + source /etc/duplicity/duplicity.cnf && duplicity collection-status --name {{ duplicity_backup_name }} --archive-dir={{ duplicity_archive_dir }} "{{ duplicity_s3_path }}" |grep 'Full\|Incremental' |grep -i "$(date +"%a %b %d")" |wc -l +{% elif 'azure' in duplicity_backend %} + source /etc/duplicity/duplicity.cnf && duplicity collection-status --name {{ duplicity_backup_name }} --archive-dir={{ duplicity_archive_dir }} "{{ duplicity_azure_path }}" |grep 'Full\|Incremental' |grep -i "$(date +"%a %b %d")" |wc -l +{% endif %} else echo "1" fi