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