diff options
| -rw-r--r-- | rsync_tmbackup.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh index 1bad059..10ec4f7 100644 --- a/rsync_tmbackup.sh +++ b/rsync_tmbackup.sh @@ -190,11 +190,11 @@ while [ "1" ]; do elif [ $stamp -ge $KEEP_DAILIES_DATE ]; then # Delete all but the most recent of each day. - [ ${date:8:2} -eq ${prev:8:2} ] && fn_expire_backup "$fname" + [ "${date:0:10}" == "${prev:0:10}" ] && fn_expire_backup "$fname" else # Delete all but the most recent of each month. - [ ${date:5:2} -eq ${prev:5:2} ] && fn_expire_backup "$fname" + [ "${date:0:7}" == "${prev:0:7}" ] && fn_expire_backup "$fname" fi prev=$date |
