From fc2c8a49a2546241c29dadb8eb00fe3c6572c11b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 7 Jan 2019 09:08:09 -0600 Subject: [PATCH] Update mysqlbu-scripts.sh --- mysqlbu-scripts.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mysqlbu-scripts.sh b/mysqlbu-scripts.sh index 57b2ad3..30ade2e 100755 --- a/mysqlbu-scripts.sh +++ b/mysqlbu-scripts.sh @@ -40,6 +40,19 @@ DELETE_BACKUP() { read -n 1 -p "Are you sure you wish to DELETE this backup (y/n)?" choice case "$choice" in [Yy]) + declare -A tbus + tba=1 + for day in $BACKUP_PATH* ; do + abet[${tba}]=$day + tbb=0 + for hour in $day/* ; do + echo -e "${idsCL[Cyan]}(${tba}${abet[${tbb}]}) -> `date -d"${tdt} ${thr//-/:}" +"%I:%M %P"` - Incremental - ${bsz}${idsCL[Default]}" + abet[${tba}${abet[${tbb}]}]=$hour + tbb=`expr $tbb + 1` + done + tba=`expr $tba + 1` + done + echo "$1" echo "" echo -e "${idsCL[Green]}Backup has been deleted${idsCL[Default]}"