Closed GoogleCodeExporter closed 9 years ago
Hmm, can you run it with "--debug Exec" and post the logs, so it can be seen
how it calls xargs? Xargs is used by rsynssh when deleteting files.
Either lsyncd screws up in creating its argument list, or the xargs on one of
your servers is too old to accept "--delimiter 0".
As workaround I'd suggest adding the temporary files to an exclude pattern or
use rsync with --temp-dir.
Original comment by axk...@gmail.com
on 17 Jan 2011 at 10:01
The minute you said "too old", I knew you had to be right. I have two
destinations that are running Solaris 10 :)
Sure enough, xargs on those boxes don't accept --delimiter. It makes even more
sense, because I have 4 targets, 2 Solaris 10, 2 RHEL5. I only received two
errors in the output above.
I found a compatible xargs available on Blastwave. Can I configure the path to
xargs per-sync? The xargs I need to run on those two servers now lives at
/opt/csw/bin/gxargs.
Original comment by jus...@techadvise.com
on 17 Jan 2011 at 10:28
You can just alter "lsyncd.lua". search for "xargs" and alter the call. You can
either use gxargs, or you can alternative alter it to use "\n" as delimiter.
Original comment by axk...@gmail.com
on 17 Jan 2011 at 11:45
Original comment by axk...@gmail.com
on 18 Jan 2011 at 2:12
Quick question - I need two of my destinations to use the gxargs, and two to
use xargs. I know I can use symlinks and paths to make this work, but I have a
more general question.
What is xargs being used for in this case? If I switched to default.rsync
would the need for xargs disappear?
Original comment by jus...@techadvise.com
on 18 Jan 2011 at 2:27
It used to delete a list of files.
default.rsync does not need xargs as it uses rsync to delete the files. With
current rsync this is quite an expensive operation since the filter lists rsync
needs is quite complicated.
you can simple change the delimiter to "\n", right before the xargs.
In lin 3185 replace "zPaths" with "sPaths" and remove the "-0" in 3187.
For any normal everday case you are not going to have "\n" in filenames anyway.
Original comment by axk...@gmail.com
on 18 Jan 2011 at 2:36
Thanks, that's what I've done. Any chance you could add a compile-time or
run-time option to engage 'old xargs' mode so I don't have to maintain a
one-off patch?
Original comment by jus...@techadvise.com
on 18 Jan 2011 at 10:55
I just added code to the SVN that will allow the user to simply configure the
xargs call for default.rsyncssh configurations:
This is the default setting:
xargs = {delimiter = '\000', binary = "xargs", xparams = {"-0", "rm -rf"}}
To change this to linefeed as seperator provide this with the sync{} call:
xargs = {delimiter = '\n', binary = "xargs", xparams = {"rm -rf"}}
Or use the binary to change that one
xargs = {delimiter = '\000', binary = "/usr/local/bin/gxargs", xparams = {"-0",
"rm -rf"}}
Sorry I didnt get to this for 2.0.2, it will be in the next release.
Original comment by axk...@gmail.com
on 25 Jan 2011 at 11:35
No problem at all - thanks much for the feature!
Original comment by jus...@techadvise.com
on 25 Jan 2011 at 3:25
Original issue reported on code.google.com by
jus...@techadvise.com
on 17 Jan 2011 at 9:56