Here's the issue I'm having...
I have a webserver that sees a fair bit of traffic. I want to keep a near real time backup of it on another server. That backup server will process log files, visitor tracking files, DB backups, etc. So I have several commands being executed at different times via cron on the backup server (crontab -e). For whatever reason I was only getting mail for some of the executions so I added logging today.
I don't think any of the commands under the user's cron are executing. (And they didn't under the root cron either - sudo crontab -e.) Below is an example of a command that runs fine from the CLI but not from the cron. The directory /media/eagle805 is a directory on the backup server where the primary server (eagle805) is mounted. The directory is owned by the user who owns the cron.
*/1 * * * * mv /media/eagle805/ver1/php/VisitorTracking/data/raw/*.raw /var/www/ver1/php/VisitorTracking/data/raw/. >> /var/www/backups/visitor_tracking_file_move_$(date +%Y-%m-%d).log 2>&1
When I run this command from the CLI it works fine. The log file is created (and empty). All the files I want moved from the primary to the backup server are moved. But it doesn't run from cron. I am getting this error (via email):
/bin/sh: 1: Syntax error: end of file unexpected (expecting ")")
Can anyone tell me what I'm missing?