View Single Post
  #104  
Old 15th April 2011, 19:30
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Lightbulb Date problems

Hello,

I think there is a date formatting problem on your system...

Can you run the next commands and post the output here:

Code:
date +%d 
date +%F
date +%Y-%m
The output should be for example:
Code:
user@main:~$ date +%d
15
user@main:~$ date +%F
2011-04-15
user@main:~$ date +%Y-%m
2011-04
gabi@main:~$
The last mysql errors are because of the date problems.

With the tempdir, I don't know why you get the error, there is the "check_tempdir" function which should create the tempdir if it's not there already and it's only failling if the /tmp dir does not exist (it's not a dir). I can put the "-p" option to mkdir but I don't know a linux computer whitout /tmp... so it's like a security option... I'm open to suggestions

Quote:
Originally Posted by clttech View Post
I was able to get the backup-res to restore the directories. I had to mkdir /tmp/tmpbck I am running the script as root. Don't know why it will not create the /tmp directories.
Now when I try to run as root ./backup-res db all 2011-04-01 this is the error I get

date: invalid date `11/'
./backup-res: line 448: [: : integer expression expected

here is line 448
if [ "$RD" -gt "$ID" ] ; then

Restoring all mysql databases from date 2011-04-01 to local server:
mysql: unknown option '-x'
mysql: unknown option '-x'
mysql: unknown option '-x'
mysql: unknown option '-x'
mysql: unknown option '-x'
mysql: unknown option '-x'
mysql: unknown option '-x'
mysql: unknown option '-x'
mysql: unknown option '-x'
mysql: unknown option '-x'
All restore jobs done!
Database all restored to date 2011-04-01!
./backup-res: line 573: /tmp/tmpbck/maildata: No such file or directory
The data bases are not restored.

Thanks so much for you help and patient with me and the others.
Reply With Quote