I am trying to schedule a MySQL database dump by using cron but I get an error for some code that I know works when I call directly in Shell.
Here is the code that works perfectly well in Shell:
mysqldump -uUSER -pPASS DB > "/path/to/backup/backup_`date +%Y%m%d%H%M%S`.sql"
However when I set a cron job up it comes back with the following error:
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file
Please can someone tell me what I am doing wrong?