rsync task do run manually, but not automatically

Status
Not open for further replies.

eretron

Dabbler
Joined
Dec 11, 2013
Messages
27
I have an issue with rsync task in FreeNAS.

Task is setup with stuff added in Extra options:

Code:
--log-file=/skripte/log/rSync/logrsync.log.`date +%d%m%Y%H%M`


So it will generate logfile with date added to filename every time it runs.

Everything runs perfect if I select task from GUI and click Run Now button, but when the task run automatically (every 6hrs), task fails with following error sent as email.

  1. Cron <root@AtomicStorage> PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/bin/lockf -s -t 0 -k "/mnt/MasterZFSv2/StorageAFP" /usr/local/bin/rsync -r -t -p --delete-delay --delay-updates --log-file=/skripte/log/rSync/logrsync.log.`date +


Followed by:

Code:
Syntax error: EOF in backquote substitution
Syntax error: Error in command substitution


So, something is wrong here, is there any reason why the whole command is not executed? What is the difference between manually running the task, and automatically?

Thanks in advace
 

eretron

Dabbler
Joined
Dec 11, 2013
Messages
27
Sorry

FreeNAS-9.3-STABLE-201501301837


Sent from my iPhone using Tapatalk
 
D

dlavigne

Guest
Sounds like a bug. Please create a report at bugs.freenas.org and post the issue number here.
 

eretron

Dabbler
Joined
Dec 11, 2013
Messages
27
Until this is fixed, can someone help me with explaining how could I see what is exact command that is run when I hit Run Now button?

This way I could make a cron task and use that as alternative solution (if that works, that is).

Thanks
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
This issue should be fixed by Monday. Just talked to the devs about 7828.

Thanks!
 

jjb2018

Dabbler
Joined
Aug 12, 2018
Messages
28
It is now Sept 2018 and I have just had this exact same issue with a new rsync task. Is this bug still not fixed? I have
Code:
--log-file=/mnt/seagate/`date +%F`.log
in my rsync task options area. I manually triggered the task from the GUI today to test it out and it ran fine but this evening, after it was automatically triggered, freeNAS emailed me with a message titled:
Code:
Cron <justin@freenas> PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/bin/lockf -s -t 0 -k "/mnt/seagate" /usr/local/bin/rsync -z -a --delete-delay --partial --include-from=/mnt/tank/home/justin/scripts/RSYNC-Backup-Filter.txt --exclude-from=/mnt/tank/home/justin/scripts/RSYNC-Backup-Filter.txt --delete --delete-excluded --log-file=/mnt/tank/home/justin/scripts/`date +

and message body saying:
Code:
/bin/sh: Syntax error: EOF in backquote substitution
/bin/sh: Syntax error: Error in command substitution

Any help would be much appreciated.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
If you'd read the bug report, you would've seen that it recommends escaping the '%' character, as a fix was considered not to be viable.

Personally and at first glance, that seems weird and should probably be reevaluated in the new GUI/middleware, so I'd encourage you to test this on FreeNAS 11.2 and to file a bug report if the issue persists.
 

jjb2018

Dabbler
Joined
Aug 12, 2018
Messages
28
Thanks for the response - and I apologies for not reading the bug report. I've not escaped the % char and it's working fine for now.
 
Status
Not open for further replies.
Top