Since nobody ddid anything i did it myself..
i know it may not be the best way to do it.. but now it works for me at least !
From line 550 and forward.. this fixes the restore script if you keep getting the -x is not valid blah blah.
Code:
for i in $arh ; do
rdb=`echo $i | cut -d "-" -f2`
edb=`echo $i | cut -d "." -f1`
$TAR $EARG $BACKUPDIR/$YDATE-$MDATE/$i
mysql -u$dbuser -p$dbpassword $rdb < $edb.sql
rm $edb.sql
done