View Single Post
Old 19th May 2011, 23:10
go0ogl3 go0ogl3 is offline
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Default ?

Originally Posted by erosbk View Post

I have a problem with this line... all is working ok but... in this line I get an error when trying to restore...

		mysql -u$dbuser -p$dbpassword $rdb < $TAR -xvjp $BACKUPDIR/$YDATE-$MDATE/$i
the $TAR variable is ok (echo $TAR shows its value), but, if I run:

echo mysql -u$dbuser -p$dbpassword $rdb < $TAR -xvjp $BACKUPDIR/$YDATE-$MDATE/$i

I get: mysql -uuser -ppassword notremember < -xvjp /mibackupdir/date/blabla

It is like mysql were eating the value of $TAR!!!

I write ANOTHER $TAR in the sentence... (... < $TAR $TAR ... ) and the echo shows it correctly:

mysql -uuser -ppassword notremember < /TARPATH -xvjp /mibackupdir/date/blabla

but I get an error =(

I am using Debian, using bash as shell... could you help me? I think that a work around could to untar in a tmp directory, and next do the dump... (this workaround would be great... I didn't have time to modify it...)

Thanks for this perfect and usefull script.
I've have this script working in multiple debian machines, different stable, but never had any issues...
Right now I can't imagine what is happening in your particular case, but please if you find out what was wrong, or if you find a solution to your case, or maybe how can I reproduce the error, please write here.

By the way what's your Debian version? What packages are installed on your computer? Did you try to duplicate the install onto a virtual machine (virtualbox or vmware) to check if the problem persist?

Thank you for your time!
Reply With Quote