diff --git a/mm-scripts.sh b/mm-scripts.sh index 2d40ca4..21edcf6 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -1218,12 +1218,17 @@ SERVICERESTORE(){ if [ "${rdates[${restore}]}" != "" ]; then echo -en "${idsCL[LightGreen]}Restoring Full Backup first ${idsCL[White]}.." tar -cPpf /tmp/cfg-full.tgz ${MM_SERVICE_CFG['readarr']} --checkpoint=.100 - echo -e "${idsCL[Green]} Done${idsCL[Default]}" + echo -e "${idsCL[Green]} Done${idsCL[Default]}\n" for r in ${!rdates[@]}; do - echo ${rdates[${r}]} - - + IFS='-'; read -a ridate <<< "${rdates[${r}]}"; unset IFS + if [ ${ridate[3]} -gt 12 ]; then hr=`expr ${ridate[3]} - 12`; ma=pm; else hr=${ridate[3]}; ma=am; fi; [ ${hr} -lt 10 ] && hr=" ${hr}" + rdate="${ridate[1]}/${ridate[2]}/${ridate[0]} @ ${hr}:${ridate[4]}${ma}" + + echo -en "${idsCL[LightGreen]}Restoring Incremental Backup from ${rdate} ${idsCL[White]}.." + tar -cPpf /tmp/cfg-full.tgz ${MM_SERVICE_CFG['readarr']} --checkpoint=.100 + echo -e "${idsCL[Green]} Done${idsCL[Default]}\n" + [ ${r} -eq ${restore} ] && break done