[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Re:backup script



At 11:31 AM -0400 6/12/02, Ismael Simoes is rumored to have typed:

> When I launch this script with root session, everything works fine.
> But when I put the script in crontab job, everything works fine ... but
> dump file is empty!!!

   Don't assume that a cronjob-spawned shell contains your settings; it
doesn't. For giggles, try adding --user=<username> --pass=<password> to your
call to mysqldump. (I assume your database is protected; if it isn't, you
have bigger problems than just not being able to dump it...)

   Most importantly, however, drop the ftp and gzip stuff until you have the
dump debugged; then add functions a step at a time instead of trying to do
everything at once. Add a piece at a time until it breaks, and you'll know
EXACTLY where your problem is. (The "#" character is your friend...)

         Charlie (yeah, I know, Programming 101)