duplicity - add check script typo

This commit is contained in:
camille 2023-06-30 16:14:51 +02:00
parent 6d60bbf200
commit 6e35cc7cec

View File

@ -2,7 +2,11 @@
# Check if backup of the day is present # Check if backup of the day is present
currenttime=$(date +%H:%M) currenttime=$(date +%H:%M)
if [[ "$currenttime" > "09:00" ]] || [[ "$currenttime" < "23:59" ]]; then if [[ "$currenttime" > "09:00" ]] || [[ "$currenttime" < "23:59" ]]; then
{% 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 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 else
echo "1" echo "1"
fi fi