diff --git a/mm-scripts.sh b/mm-scripts.sh index 4d5461d..e49f1c7 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -1198,7 +1198,7 @@ SERVICERESTORE(){ f=2; declare -a rdates # for bakfile in ${BACKUPDIR}/${fcheck}.*.tgz; do - for bakfile in `find ${BACKUPDIR} -name "${fcheck}.*.tgz" -type f -printf "%f\n" | sort -n`; do + for bakfile in `find ${BACKUPDIR} -name "${fcheck}.*.tgz" -type f -printf "%f\n" | sort -rn`; do fname=${bakfile##*/} fdate=${fname#*.}; fdate=${fdate%.*} rdates[${f}]="${fdate}"