Update mm-scripts.sh

This commit is contained in:
2023-07-10 21:57:11 -05:00
parent df69e6cb8f
commit 62bb60a6b0

View File

@@ -1200,20 +1200,21 @@ SERVICERESTORE(){
for bakfile in ${BACKUPDIR}/${fcheck}.*.tgz; do
fname=${bakfile##*/}
fdate=${fname#*.}; fdate=${fdate%.*}
rdates[${f}]="${fdate}"
IFS='-'; read -a f_date <<< "${fdate}"; unset IFS
if [ ${f_date[3]} -gt 12 ]; then hr=`expr ${f_date[3]} - 12`; ma=pm; else hr=${f_date[3]}; ma=am; fi; [ ${hr} -lt 10 ] && hr=" ${hr}"
fdate="${f_date[1]}/${f_date[2]}/${f_date[0]} @ ${hr}:${f_date[4]}${ma}"
[ $f -lt 10 ] && df=" $f" || df=$f
echo -e "[${idsCL[LightCyan]}${df}${idsCL[Default]}]${idsCL[White]} ${fdate} - Incremental Backup - ${fname}${idsCL[Default]}"
echo -e "[${idsCL[LightCyan]}${df}${idsCL[Default]}]${idsCL[White]} ${fdate} - Incremental Backup${idsCL[Default]}"
f=$((f+1))
done
echo
echo -en "${idsCL[LightCyan]}Select a backup to restore: ${idsCL[White]}"
echo -en "\n${idsCL[LightCyan]}Select a backup to restore: ${idsCL[White]}"
read restore
echo ${rdates[${restore}]}
fi
}