I need to automate the backup of the files on my webserver and the MySQL db. I want to tar up the files and mysqldump the db and save them through the network to a fileserver or ftp server. I've been trying to setup a cron job in crontab but its not working. I can't even seem to get the cron job set up properly. This is what I did:
I saved this in crontab but I got a mail message with this error when the cron job tried to run:
I'm kinda a newb with Cron jobs. any help would be appreciated
Thanks in advance.
| Code: |
|
crontab -e 01 12 * * * mysqldump -uuname -ppass dbname > dbname.$(date +%Y%m%d%-%H%M%S).sql |
I saved this in crontab but I got a mail message with this error when the cron job tried to run:
| Code: |
|
Subject: Cron <ammon@pandev02> mysqldump -uuname -ppass dbname > /home/ammon/backup/dbname.$(date + X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/home/ammon> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=ammon> /bin/sh: -c: line 1: unexpected EOF while looking for matching `)' /bin/sh: -c: line 2: syntax error: unexpected end of file |
I'm kinda a newb with Cron jobs. any help would be appreciated
Thanks in advance.
