1
0
mirror of https://github.com/garraflavatra/docker-volume-s3-backup.git synced 2025-05-17 05:14:37 +00:00

Updated backup remove cron date variable.

This commit is contained in:
Dmitriy Haidiuk 2022-04-13 00:21:34 +03:00
parent b1b12e8a05
commit 2e45dc55b8

View File

@ -85,7 +85,7 @@ rm "$local_file"
echo "Backup complete."
if [ "$BACKUP_KEEP_DAYS" -ne 0 ]; then
ms=$((2*BACKUP_KEEP_DAYS+1))
ms=$((86400*BACKUP_KEEP_DAYS))
date_from_remove=$(date -d "@$(($(date +%s) - ms))" +%Y-%m-%d)
backups_query="Contents[?LastModified<='${date_from_remove} 00:00:00'].{Key: Key}"