[ubuntu-za] mysqldump fails
Alf Stockton
alf at stockton.co.za
Wed Jun 24 09:32:23 BST 2009
David Rubin wrote:
> On Wed, Jun 24, 2009 at 10:08 AM, Alf Stockton <alf at stockton.co.za
> <mailto:alf at stockton.co.za>> wrote:
>
> If I run
> mysqldump --add-drop-table -u root phplist > /Backups/phplist.backup.sql
> from the command line as root it works perfectly but.....not if I do
> the same
> command from root's crontab.
> Can someone please explain ?
>
>
> You might need an absolute path ie
> drubin at drubin:~$ which mysqldump
> /usr/bin/mysqldump
>
> and then in the crontab use /usr/bin/mysqldump instead of mysqldmp
>
> I think the reasoning for this is that root's cron tab doesn't load
> environment variables so that PATH variable isn't set. Maybe some one
> can explain the reasoning better then I can.
>
Thank you David. I will certainly try that. I was so busy investigating
permissions that I did not think of environment variables.
--
Regards,
Alf Stockton www.stockton.co.za
Give him an evasive answer.
More information about the ubuntu-za
mailing list