Update mysqlbu-scripts.sh
This commit is contained in:
@@ -64,23 +64,19 @@ DELETE_BACKUP() {
|
|||||||
sbu1a=(${tbus[$1]})
|
sbu1a=(${tbus[$1]})
|
||||||
unset IFS
|
unset IFS
|
||||||
|
|
||||||
if [ ${#1} = 1 ]; then
|
|
||||||
echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]}" +"%A, %B %d, %Y"`${idsST[Reset]} ${idsCL[Red]}(${bsz})${idsCL[Default]}"
|
|
||||||
else
|
|
||||||
echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]} ${thr//-/:}" +"%A, %B %d, %Y - %I:%M %P"`${idsST[Reset]} ${idsCL[Red]}(${bsz})${idsCL[Default]}"
|
|
||||||
fi
|
|
||||||
echo ""
|
echo ""
|
||||||
if [ ${#1} = 1 ] || [ "${sbu1a[5]: -5}" = "_BASE" ]; then
|
if [ ${#1} = 1 ] ; then
|
||||||
if [ ${#1} = 1 ]; then
|
echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]}" +"%A, %B %d, %Y"` - (Entire Day) - (${bsz})${idsST[Reset]}"
|
||||||
echo -e "${idsCL[Red]}(This will DELETE the entire days worth of backups for the date selected.)"${idsCL[Default]}
|
echo -e "${idsCL[Red]}(This will DELETE the entire days worth of backups for the date selected.)"${idsCL[Default]}
|
||||||
else
|
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 %P"` (${bsz})${idsST[Reset]}"
|
||||||
echo -e "${idsCL[Red]}(This is a daily base backup, and will result in the full day being DELETED.)"${idsCL[Default]}
|
echo -e "${idsCL[Red]}(This is a daily base backup, and will result in the full day being DELETED.)"${idsCL[Default]}
|
||||||
fi
|
|
||||||
delbu="/${sbu1a[1]}/${sbu1a[2]}/${sbu1a[3]}/${sbu1a[4]}"
|
delbu="/${sbu1a[1]}/${sbu1a[2]}/${sbu1a[3]}/${sbu1a[4]}"
|
||||||
else
|
else
|
||||||
delbu=${sbu1}
|
delbu=${sbu1}
|
||||||
fi
|
fi
|
||||||
read -p "Are you sure you wish to DELETE this backup (y/n)?" choice
|
read -p "Are you sure you wish to DELETE this backup (y/N)?" choice
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
[Yy])
|
[Yy])
|
||||||
rm -rf $delbu
|
rm -rf $delbu
|
||||||
|
|||||||
Reference in New Issue
Block a user