Project

General

Profile

Bug #21400

Rsync task isn't working correctly

Added by T Boersma over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Nice to have
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

When creating an Rsync task with the setting "Delay Updates" selected (which is the default), a cron job is created. However because of the missing quotes around "--delay-updates", rsync doesn't use the parameter.

The following is created in crontab:

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/bin/lockf -s -t 0 -k "/mnt/local/upload" /usr/local/bin/rsync -r -t -z --delay-updates -e "ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes" "/mnt/local/upload" "root"@nas@domail.local:\""/mnt/local"\" 2>&1 |/usr/bin/logger -t rsync

And should be:

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/bin/lockf -s -t 0 -k "/mnt/local/upload" /usr/local/bin/rsync -r -t -z "--delay-updates" -e "ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes" "/mnt/local/upload" "root"@nas@domail.local:\""/mnt/local"\" 2>&1 |/usr/bin/logger -t rsync

Please note that you can only test this as a cron job, because directly from the commandline it also works without quotes.

History

#1 Avatar?id=14398&size=24x24 Updated by Kris Moore over 3 years ago

  • Assignee set to William Grzybowski
  • Priority changed from No priority to Nice to have

This makes zero sense to me. I've never seen an issue with cron jobs that require quotes around non-whitespaced arguments. William, is this anything you've heard of?

In the meantime, do you have some logs or other output which could indicate that --delay-updates isn't being used? Debug might be helpful from System -> Advanced -> Save Debug

#2 Updated by William Grzybowski over 3 years ago

  • Status changed from Unscreened to 15
  • Target version set to 9.10.3

Makes zero sense to me as well. Waiting for logs.

#3 Updated by T Boersma over 3 years ago

Thanks for the responses.

It doesn't make sense to me too. I got it working when I added quotes around it, but perhaps it is being caused by something else. I will do some more testing, but next week I don't have time for it.

#4 Avatar?id=14398&size=24x24 Updated by Kris Moore over 3 years ago

  • Target version changed from 9.10.3 to 9.10.4

#5 Avatar?id=14398&size=24x24 Updated by Kris Moore over 3 years ago

  • Target version changed from 9.10.4 to 11.1

#6 Updated by William Grzybowski over 3 years ago

  • Status changed from 15 to Closed
  • Target version changed from 11.1 to N/A

Closing as timeout.

Also available in: Atom PDF