Update mysqlbu-scripts.sh

This commit is contained in:
2020-02-15 23:35:06 -06:00
parent 5f6b5a06f1
commit 10ec8ea83f

View File

@@ -168,23 +168,25 @@ DELETE_MENU() {
echo -e "${idsCL[LightYellow]}========== Select Which Backup to Delete ==========${idsCL[Default]}"
tba=1
for day in $BACKUP_PATH/* ; do
#tdt=`sed 's/.*\///' <<< $day`
tdt=`echo $day | sed 's/.*\///'`
bsz=`du -sh ${day} | awk '{print $1}'`
echo -e "${idsBG[Blue]}${idsCL[LightYellow]}(${tba})${idsCL[White]} -> `date -d"${tdt}" +"%A, %B %d, %Y"` - ${bsz} ${idsCL[Default]}${idsBG[Default]}"
tbb=0
for hour in $day/* ; do
#thr=`sed 's/.*\///' <<< ${hour//_BASE/}`
thr=`echo ${hour//_BASE/} | sed 's/.*\///'`
bsz=`du -sh ${hour} | awk '{print $1}'`
if [ ${hour: -5} = "_BASE" ]; then
echo -e "${idsCL[LightYellow]}(${tba}${abet[${tbb}]^^})${idsCL[LightGreen]}${idsST[Bold]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - FULL BACKUP${idsST[Reset]}${idsCL[LightGreen]} - ${bsz}${idsCL[Default]}"
else
echo -e "${idsCL[LightYellow]}(${tba}${abet[${tbb}]^^})${idsCL[Cyan]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - Incremental - ${bsz}${idsCL[Default]}"
fi
tbb=`expr $tbb + 1`
done
tba=`expr $tba + 1`
if [ "${day}" != "${BACKUP_PATH}/latest" ]; then
#tdt=`sed 's/.*\///' <<< $day`
tdt=`echo $day | sed 's/.*\///'`
bsz=`du -sh ${day} | awk '{print $1}'`
echo -e "${idsBG[Blue]}${idsCL[LightYellow]}(${tba})${idsCL[White]} -> `date -d"${tdt}" +"%A, %B %d, %Y"` - ${bsz} ${idsCL[Default]}${idsBG[Default]}"
tbb=0
for hour in $day/* ; do
#thr=`sed 's/.*\///' <<< ${hour//_BASE/}`
thr=`echo ${hour//_BASE/} | sed 's/.*\///'`
bsz=`du -sh ${hour} | awk '{print $1}'`
if [ ${hour: -5} = "_BASE" ]; then
echo -e "${idsCL[LightYellow]}(${tba}${abet[${tbb}]^^})${idsCL[LightGreen]}${idsST[Bold]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - FULL BACKUP${idsST[Reset]}${idsCL[LightGreen]} - ${bsz}${idsCL[Default]}"
else
echo -e "${idsCL[LightYellow]}(${tba}${abet[${tbb}]^^})${idsCL[Cyan]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - Incremental - ${bsz}${idsCL[Default]}"
fi
tbb=`expr $tbb + 1`
done
tba=`expr $tba + 1`
fi
done
echo -e "${idsCL[Yellow]}===================================================${idsCL[Default]}"
echo ""