davideuler / lsyncd

Automatically exported from code.google.com/p/lsyncd
GNU General Public License v2.0
0 stars 0 forks source link

lsyncd ignores "--filter" command in rsyncOpts for rsyncssh (and maybe rsync) #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have configured lsyncd with the following 'sync' settings:

sync{
    default.rsyncssh, source = "/home/piper/src/",
    host = "piperdev",
    targetdir = "lsyncd/src/",
    rsyncOpts = {"-lts", "--filter='. /home/piper/etc/rsync.filter'"}
}

The rsync filter file specified by the --filter option preserves build-output 
from being deleted (basically everything under the direcotry "src/build" on the 
target host).

When I run lsyncd with "-log all", I see this in the output:

14:28:27 Exec: /usr/bin/rsync [--delete] [-r] [-lts] [/home/piper/src/] 
[piperdev:src/]

So the "--filter" option in rsyncOpts is being ignored, and my build output is 
hence deleted by the sync.

I am running lsyncd 2.0.4, on an Ubuntu 10.10 host with a FreeBSD 7.3 target.

Original issue reported on code.google.com by andy.pi...@gmail.com on 3 Nov 2011 at 2:45

GoogleCodeExporter commented 9 years ago
I've now tested this case using rsync instead of rsyncssh and see the same 
"ignore --filter in rsyncOpts" behaviour

Original comment by andy.pi...@gmail.com on 3 Nov 2011 at 2:52

GoogleCodeExporter commented 9 years ago
In Lsyncd 2.0.4 the option was called "rsyncOps" not "rsyncOpts". 

Since many people confused this and this was a common error, it was changed to 
be officially rsyncOpts in 2.0.5

(Actually I planned 2.0.5 to be able to understand rsyncOps to be backwards 
compatible, but I messed the code up. However, 2.0.5 will complain if 
"rsyncOps" is present and will accept rsyncOpts right away.

Original comment by axk...@gmail.com on 3 Nov 2011 at 3:05

GoogleCodeExporter commented 9 years ago
Thanks for the quick response - that has solved my problem! :)

Original comment by andy.pi...@gmail.com on 4 Nov 2011 at 9:28