On 05/11/12 19:36, Johnny A. Solbu wrote:

I have problems customizing it for my own use. (I'm testiing manually for the 
time being)
It won't exclude the things I say it should exclude.
My copy have this line:
==
myexcludes="--exclude={debug/,backports_testing,updates_testing/}"
==
It does Not exclude them. (Note that I am excluding all debug and _testing 
folders, but Not SRPMS)
That line used in my manuall rsync command, works. They are excluded.

So, why won't this work in cronsync?

Hi Johnny,
Sorry for delay - I missed the post.
It's your syntax.
This works using your excludes with the syntax in line 20 of this new script.

http://paste.kde.org/598076/

I fixed another bug and changed it slightly to better display rsync errors in the log. I have not seen any problems recently and it's running every hour. It currently keeps a filecount history log as well, but that's just for interest and testing.

The problem with your syntax seems to be related to the {} - I don't fully understand why, but it causes a pair of ' to be wrapped around the --exclude option in the final rsync command :

rsync -rlptgoDhHSn --stats --delete-after --delete-excluded --protect-args '--exclude={debug/,backports_testing,updates_testing/}' rsync://distrib-coffee.ipsl.jussieu.fr:/pub/linux/Mageia/distrib /zmrepo/pub/linux/Mageia/

With my syntax it appears like this:-

rsync -rlptgoDhHSn --progress --stats --delete-after --max-delete=1000 --delete-excluded --protect-args --exclude=debug --exclude=backports_testing --exclude=updates_testing rsync://distrib-coffee.ipsl.jussieu.fr:/pub/linux/Mageia/distrib /zmrepo/pub/linux/Mageia/

Regards
Barry

Reply via email to