mirror of
https://github.com/garraflavatra/docker-volume-s3-backup.git
synced 2025-05-17 13:14:38 +00:00
Updated backup remove cron date variable.
This commit is contained in:
parent
b1b12e8a05
commit
2e45dc55b8
@ -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}"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user