rsync -avr --delete --log-file="/var/log/rsync/rsync.log.$(date +%Y%m%d%H%m%S)" /home /mnt/backnas
I used above command in crontab to backup home directory to nas drive. thanks for contribs.org people told me how to see admin logs via webmail, it logs everything.
In the log I see following error after i added --log-file="/var/log/rsync/rsync.log.$(date +%Y%m%d%H%m%S)" to the above syntax in the crontab.
/bin/sh: -c: line 0: unexpected EOF while looking for matching `)'
/bin/sh: -c: line 1: syntax error: unexpected end of file
But I manually run this command, it works fine. but with crontab it makes an error code and stops with no rsync.log file created.
how solve this problem?