Skip to content
Snippets Groups Projects
Commit e0311743 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

show overdue on archived backups

parent cd86adde
Branches
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@
# 2019-10-20 v1.3 hahn source inc_config.sh
# 2020-12-07 v1.4 hahn deactivate backup
# 2021-06-16 v1.5 hahn handle multiple backup tools
# 2022-08-15 v1.6 hahn show overdue on archived backups
# ----------------------------------------------------------------------
......@@ -16,7 +17,7 @@
cd ${sBackupBasedir} || exit 1
sVersion=1.5
sVersion=1.6
typeset -i iErrors=0
typeset -i iHours=36
typeset -i iMinutes=$iHours*60
......@@ -136,14 +137,13 @@ do
cat $myserver/$sInactiveFile
typeset -i iAge=`_getFileAge "$myserver/$sInactiveFile"`
typeset -i iDays=$iKeepBackups-$iAge/60/60/24
echo "INFO: keeping it $iKeepBackups d .. $iDays d left."
# echo Age: $iAge s
if [ $iDays -lt 0 ]; then
color error
echo "ERROR: Outdated backup was found! You can delete data for $myserver."
color reset
iErrors=$iErrors+1
else
echo "INFO: keeping it $iKeepBackups d .. $iDays d left."
fi
else
_checkDir $myserver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment