Update mm-scripts.sh

This commit is contained in:
2023-07-10 22:36:55 -05:00
parent 75c393ebb0
commit 49cd52c63c

View File

@@ -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