solotimes / lsyncd

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

Exclude doesn't work with rsyncssh #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Here is my lsyncd.conf :

settings = {
  logfile = "/home/toto/log/lsyncd.log",
  statusFile = "/home/toto/log/lsyncd.status",
}

sync{
  default.rsyncssh,
  source = "/home/src/example",
  host = "192.168.1.100",
  targetdir = "/home/dest/example",
  exclude = {"//home/src/example/tmp/**"}
}

Launched with :

> lsyncd -nodaemon -log all etc/lsyncd.conf

I get :

Exclude: toLuaPattern '//home/src/example/tmp/**' = '^/home/src/example/tmp/.*"

So the pattern looks ok (although I'd suggest let people use real Lua regex 
patterns, it will make easier for everybody, and allow more possibilities. The 
translation from your pseudo patterns to Lua patterns is unnecessary in my 
opinion).

21:13:23 Function: Inotify.addWatch(/home/src/example/tmp/, (true), (nil), 
(nil))
21:13:23 Inotify: not concerning '/home/src/example/tmp/'

So pattern seems to work. But it is not used in the rsync command :

21:13:23 Exec: /usr/bin/rsync [--delete] [-r] [-lts] [/home/src/example/] 
[192.168.1.100:/home/dest/example/]

And I get many :

rsync: send_files failed to open "/home/src/example/tmp/sessions/sess_1234": 
Permission denied (13)

Although I told the conf to ignore this directory.

Am I doing something wrong or is this a bug ?
Do i have to add something specific for the rsync command ? The -exclude-from 
doesn't seem to exist anymore.

Thanks in advance :)

Original issue reported on code.google.com by golg...@gmail.com on 17 Jan 2011 at 8:30

GoogleCodeExporter commented 9 years ago
I will look at this. Can you add the events in the log that raised this sync? 
Or is this the startup?

BTW: my "pseudo patterns" are modelled after the patterns described in the 
rsync manual. 

Original comment by axk...@gmail.com on 17 Jan 2011 at 9:56

GoogleCodeExporter commented 9 years ago
I realized that, about the "pseudo patterns", sorry :)
Maybe the function that converts rsync patterns to Lua patterns needs some 
refinements, I am not sure.

These are errors at startup, when lsyncd is launched. It then stops probably 
because rsync raises these permission errors.

I guess the Lua function that build the rsync command is incomplete and doesn't 
build the --exclude correctly or at all ?

Original comment by golg...@gmail.com on 18 Jan 2011 at 12:11

GoogleCodeExporter commented 9 years ago
I suppose the guess is correct. I will look at it as soon I get to it.

Original comment by axk...@gmail.com on 18 Jan 2011 at 2:12

GoogleCodeExporter commented 9 years ago
fixed with Lsycnd 2.0.2

Thank you for reporting.

Original comment by axk...@gmail.com on 20 Jan 2011 at 8:07