Update mysqlbu-scripts.sh

This commit is contained in:
2019-02-03 23:18:55 -06:00
parent 186fb93d3e
commit 7d5a5ec6c8

View File

@@ -81,11 +81,11 @@ DELETE_BACKUP() {
echo -e "${idsCL[Red]}(This will DELETE the entire days worth of backups for the date selected.)"${idsCL[Default]}
delbu=${sbu1}
elif [ "${sbu1a[5]: -5}" = "_BASE" ]; then
echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]} ${thr//-/:}" +"%A, %B %d, %Y - %i:%M"` - Full Backup - (${bsz})${idsST[Reset]}"
echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]} ${thr//-/:}" +"%A, %B %d, %Y - %H:%M"` - Full Backup - (${bsz})${idsST[Reset]}"
echo -e "${idsCL[Red]}(This is a daily base backup, and will result in the full day being DELETED.)"${idsCL[Default]}
delbu="/${sbu1a[1]}/${sbu1a[2]}/${sbu1a[3]}/${sbu1a[4]}"
else
echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]} ${thr//-/:}" +"%A, %B %d, %Y - %i:%M"` - Incremental - (${bsz})${idsST[Reset]}"
echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]} ${thr//-/:}" +"%A, %B %d, %Y - %H:%M"` - Incremental - (${bsz})${idsST[Reset]}"
delbu=${sbu1}
fi
read -p "Are you sure you wish to DELETE this backup (y/N)?" choice
@@ -177,9 +177,9 @@ DELETE_MENU() {
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//-/:}" +"%i:%M"` - FULL BACKUP${idsST[Reset]}${idsCL[LightGreen]} - ${bsz}${idsCL[Default]}"
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//-/:}" +"%i:%M"` - Incremental - ${bsz}${idsCL[Default]}"
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
@@ -315,9 +315,9 @@ case $1 in
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//-/:}" +"%i:%M"` - FULL BACKUP${idsST[Reset]}${idsCL[LightGreen]} - ${bsz}${idsCL[Default]}"
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//-/:}" +"%i:%M"` - Incremental - ${bsz}${idsCL[Default]}"
echo -e "${idsCL[Cyan]} -> `date -d"${tdt} ${thr//-/:}" +"%H:%M"` - Incremental - ${bsz}${idsCL[Default]}"
fi
done
done