On Tue, May 13, 2008 at 09:41:08PM +0100, Chris G wrote:
I have a couple of backups that run overnight which use rdiff-backup to send files to a remote system.
The crontab (as shown by 'crontab -l') entry is as follows:-
25 03 * * * rdiff-backup --remote-schema 'ssh -C %s /home/isbd/bin/rdiff-backup --server' isbd@shell.gradwell.net::. /rdiffBackup/gradwell
If I run the rdiff-backup from the command line (copy and paste the above excluding the '25 03 * * * ' then it runs perfectly without errors.
However the cron job is failing and sending me the following mail:-
/bin/sh: -c: line 0: unexpected EOF while looking for matching `'' /bin/sh: -c: line 1: syntax error: unexpected end of file
Why do I always find the error just after I ask about it here! It's not a quoting problem, it's that %. % is special in a crontab (see 'man 5 crontab') and needs to be escaped if you want a real %.