mysqldump and cron
I've written the following shell command, and execute it without issue.
mysqldump -databasename -u username --password='dbpassword' > /backupdir/sitedbname/m-databasename=`date '+%d-%y'.sql
When I place the same command within my cron file - well, nothing happens. Of course, I want this command to execute, and create a sql backup.
I am wondering, do I need to place this command in a file?
If so, what naming convention should I use (i.e. filename.extension)?
Where should I place the file?
How do I call it from inside cron?
Naturally, cron presents only one solution for recurring calls, if there is a better solution that can run mysqldump, I'm very open.
Help?
(In the meantime I get to manually execute this script each day for all my client databases - phew, that's fun!)
MAC G4, Mac OS X (10.4.8)