Comments (10)
This bug is still open in version 1.33.
Think of the following test case:
We want to sync the local folder syncme to myserver.org.
The local directory layout is as follows:
/syncme/my spaced dir/some file.txt
/syncme/my spaced dir/some other file.txt
And this is how the server receives it:
/syncme/my spaced dir/ ## an empty folder
/syncme/my/some file.txt ## our two files will actually be stored
under this broken up name
/syncme/my/some other file.txt
Original comment by [email protected]
on 27 Jun 2010 at 7:10
from lsyncd.
The bug does not occur on initial sync.
The following happens while monitoring /syncme with lsyncd:
$ cd /syncme
/syncme $ mkdir "my spaced dir" ## this will start rsync
and will
## create "some spaced dir" folder on the destination
/syncmde $ touch "my spaced dir/some file.txt" ## this starts rsync again but
now the file
## will be safed to "my/some file.txt"
First I thought that the bug is triggered by wrong escaping but since the
application uses execv for calling rsync there should be no problem.
By calling above like commands the bug is always reproduceable.
Original comment by [email protected]
on 27 Jun 2010 at 8:20
from lsyncd.
Sorry, it works for me.
Maybe this a rsync bug? I'm using 2.6.9
Original comment by [email protected]
on 11 Jul 2010 at 8:17
- Changed state: Wait
from lsyncd.
I just ran into this issue as well.
I think the problem is that rsync sends command lines to the remote host. In
particular, the command
rsync -av '/abc/def ghj/kl mn/' 'host:/abc/def ghj/kl mn/'
does not work (and this is what lsyncd issues). The remote path must be
explicitly escaped, e.g. as
rsync -av '/abc/def ghj/kl mn/' 'host:"/abc/def ghj/kl mn/"'
(cf. http://www.samba.org/rsync/FAQ.html#9)
One way to work around this is to pass the option "--protect-args" to rsync.
After adding <option text="--protect-args"/> to the <callopts> section of my
lsyncd.conf.xml, directories with spaces appear to be synced just fine. Should
this option be on by default?
Original comment by [email protected]
on 8 Aug 2010 at 3:45
from lsyncd.
it sounds useful, strange enough my rsync does not know this option.
You know at which rsync version this was introduced or removed?
Neither is it included in my rsyncs manpage.
# rsync --protect-args 44 55
rsync: --protect-args: unknown option
rsync error: syntax or usage error (code 1) at main.c(1318) [client=2.6.9]
Original comment by [email protected]
on 8 Aug 2010 at 6:59
- Changed state: New
from lsyncd.
It looks like this option was added with version 3.0.0.
(http://www.samba.org/ftp/rsync/src/rsync-3.0.0-NEWS)
Sorry, I didn't realize this option was new.
Original comment by [email protected]
on 9 Aug 2010 at 6:10
from lsyncd.
I'm thinking of how to solve this issue most elegantly. I could per default
probe for rsyncs version, or just add -s (protect-args) per default, and deal
with people complaining it doesnt work with < 3.0. I guess turning it on per
default is a useful think, plus a probe and warning if rsync is < 3.0
Original comment by [email protected]
on 9 Aug 2010 at 9:21
from lsyncd.
I suppose the best solution would be to escape file names in lsyncd, so that it
will also work with all versions of rsync ;-).
I guess that it would be enough to turn any path of the form
"hostname:pathname" into "hostname:'pathname'". But I'm not sure how to do this
reliably, since it would require some parsing of source and target paths. One
could perhaps use rsync's function parse_hostspec from option.c to do the
parsing (if licensing allows). But this looks a little fragile as well, as one
should want to keep in sync with rsync then.
Anyway, I'm happy with protect-args for now.
Original comment by [email protected]
on 9 Aug 2010 at 11:53
from lsyncd.
I'll add -s (protect-args) as default value.
Its better than mangling around with pathnames to get rsync in a behavior I
think it should have been using as default from get go. Seems the only one
using a production system old enough to have rsync 2.x is me ;-)
Generally most times I try to not tinker lsyncd too much to the special needs
of rsync, but be a generall binary calling on event happening daemon.
Original comment by [email protected]
on 9 Aug 2010 at 11:58
from lsyncd.
Version 1.38 now has -s in the default arguments. I suppose this is now thus
fixed.
Original comment by [email protected]
on 7 Sep 2010 at 7:24
- Changed state: Fixed
from lsyncd.
Related Issues (20)
- lsyncd spinning 100% CPU, writing "Normal: waiting for 1 more child processes" indefinitely to the log HOT 5
- Why only -lts option as argument to rsync HOT 5
- rsyncOps in documentation should be rsyncOpts HOT 4
- lsyncd crashes when it gets a notification from kernel HOT 2
- maxDelays doesn't seem to work HOT 6
- initial sync is too agressive HOT 1
- Documentation HOT 6
- rsyncOpts should be able to override "--delete" too HOT 3
- Ubuntu installation ./configure finding lua HOT 1
- lsyncd on arm system not finding getConfig() HOT 2
- lsync dies after initial sync HOT 18
- Compilation Errors on Solaris 11 Express HOT 2
- lsyncd ignores "--filter" command in rsyncOpts for rsyncssh (and maybe rsync) HOT 3
- Thousands of log messages: "Normal: waiting for 1 more child processes." HOT 4
- User and Group ownership not preserved HOT 4
- Bi-directional sync (possibly with unison?) HOT 3
- ERROR: Connection to remote host failed. HOT 2
- Treat rsync exit code 13 as temporary problem HOT 1
- tried to implement the group permission example using octal notation instead of "g+rw", lsyncd status immediately becomes: lsyncd dead but pid file exists HOT 5
- Fails to make on FreeBSD 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsyncd.