I was running a weekly cron job that sent some files to backup to an offsite server. It was working well, so I thought I should try to do it every day for a more robust backup solution, and that's where I got hung up. I want to backup to to a directory based on the day of the week, it seems cron doesn't like that since the exact same command works from the command line. Here is the line from cron:
Code: Select all
/usr/bin/rsync -avzhe "ssh -p 222" --exclude-from '/home/laca/exclude.jb' /mnt/tom1/backups/jbserver/jbserver laca@****.dyndns.org:/media/laca/`/bin/date +\%A`/
Code: Select all
/usr/bin/rsync -avzhe ssh -p 222 --exclude-from /home/laca/exclude.jb /mnt/tom1/backups/jbserver/jbserver laca@****.dyndns.org:/media/laca/Monday/