[thelist] mysqldump and crontab

Robert Gormley robert at pennyonthesidewalk.com
Sat Apr 8 07:40:35 CDT 2006


I'm trying to set up a mysqldump job by crontab - problem is, the job 
works via command line (bash shell on CentOS 4.3), but errors when run 
by crontab.

This is the command line:

/usr/local/bin/mysqldump -A --user=xxx --password=xxx | /usr/bin/bzip2 
-c > /home/backup/db/`date
    \+%Y%m%d`.sql.bz2

The above works fine.
When run through /etc/crontab:

51 6 * * * root /usr/local...

I get this error from the Cron Daemon:

/bin/bash: -c: line 0: unexpected EOF while looking for matching ``'
/bin/bash: -c: line 1: syntax error: unexpected end of file

Anyone able to help?

Rob




More information about the thelist mailing list