Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: smnirosh on December 02, 2015, 10:50:55 PM
-
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?
-
Please file a bug report.
-
Ok RequestedDeletion, I posted it in the bug report. thanks
-
moving to General Discussion, seems more a syntax error that a strictly SME related issue
-
Danial B. is suggesting to add user account to run this command. Do i have to put admin username of server or username of NAS drive? show me a little example. thanks
-
Danial B. is suggesting to add user account to run this command. Do i have to put admin username of server or username of NAS drive? show me a little example. thanks
Smirno,
You MUST go and read some documentation and educate yourself a bit more.
Search engines are very good. Just do 'man crontab' and you will lots of help. They even translate pages for you.....
e.g. http://linux.die.net/man/5/crontab
For the record here I think the format you are looking at is something like :
00 20 * * 1-5 root rsync -avr --delete
Note the user 'root'
-
Thanks very much ReetP. I will refer this link.
-
.$(date +%Y%m%d%H%m%S)"
I removed this part of the file then it works. But it append data to the same rsync.log file without creating relavent rsync.log files. is there any mistake with this part of command?
-
instead of calling rsync from crontab, just create your backup script and then call it from crontab.
easier to do than to explain :-)
-
is there any default location where sme server saves rsync log?
-
is there any default location where sme server saves rsync log?
No.
-
Please file a bug report.
That wouldn't be appropriate for a custom change.
Stefano's advice is appropriate.