now using rclone --min-age flag to determine age of backups

This commit is contained in:
Mustapha Zorgati
2021-02-22 19:23:39 +01:00
parent 1a2887d58a
commit b17e1e54e8
+1 -1
View File
@@ -108,7 +108,7 @@ function clear_history() {
if [[ "${BACKUP_KEEP_DAYS}" -gt 0 ]]; then if [[ "${BACKUP_KEEP_DAYS}" -gt 0 ]]; then
color blue "delete ${BACKUP_KEEP_DAYS} days ago backup files" color blue "delete ${BACKUP_KEEP_DAYS} days ago backup files"
local RCLONE_DELETE_LIST=$(rclone lsf "${RCLONE_REMOTE}" | head -n -${BACKUP_KEEP_DAYS}) local RCLONE_DELETE_LIST=$(rclone lsf "${RCLONE_REMOTE}" --min-age ${BACKUP_KEEP_DAYS}d)
for RCLONE_DELETE_FILE in ${RCLONE_DELETE_LIST} for RCLONE_DELETE_FILE in ${RCLONE_DELETE_LIST}
do do