Update mysqlbu-scripts.sh
This commit is contained in:
@@ -309,20 +309,21 @@ case $1 in
|
||||
echo ""
|
||||
echo -e "${idsCL[LightYellow]}============ Available MySQL Backups ============${idsCL[Default]}"
|
||||
for day in $BACKUP_PATH* ; do
|
||||
echo ": ${day}"
|
||||
tdt=`sed 's/.*\///' <<< $day`
|
||||
bsz=`du -sh ${day} | awk '{print $1}'`
|
||||
echo -e "${idsBG[Blue]}${idsCL[White]}-> `date -d"${tdt}" +"%a, %B %d, %Y"` - ${bsz} ${idsCL[Default]}${idsBG[Default]}"
|
||||
if [ "${day}" != "/opt/idssys/backups/mysql-backups/latest" ]; then
|
||||
tdt=`sed 's/.*\///' <<< $day`
|
||||
bsz=`du -sh ${day} | awk '{print $1}'`
|
||||
echo -e "${idsBG[Blue]}${idsCL[White]}-> `date -d"${tdt}" +"%a, %B %d, %Y"` - ${bsz} ${idsCL[Default]}${idsBG[Default]}"
|
||||
|
||||
for hour in $day/* ; do
|
||||
thr=`sed 's/.*\///' <<< ${hour//_BASE/}`
|
||||
bsz=`du -sh ${hour} | awk '{print $1}'`
|
||||
if [ ${hour: -5} = "_BASE" ]; then
|
||||
echo -e "${idsCL[LightGreen]}${idsST[Bold]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - FULL BACKUP${idsST[Reset]}${idsCL[LightGreen]} - ${bsz}${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[Cyan]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - Incremental - ${bsz}${idsCL[Default]}"
|
||||
fi
|
||||
done
|
||||
for hour in $day/* ; do
|
||||
thr=`sed 's/.*\///' <<< ${hour//_BASE/}`
|
||||
bsz=`du -sh ${hour} | awk '{print $1}'`
|
||||
if [ ${hour: -5} = "_BASE" ]; then
|
||||
echo -e "${idsCL[LightGreen]}${idsST[Bold]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - FULL BACKUP${idsST[Reset]}${idsCL[LightGreen]} - ${bsz}${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[Cyan]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - Incremental - ${bsz}${idsCL[Default]}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
echo -e "${idsCL[Yellow]}=================================================${idsCL[Default]}"
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user