rsync over stdin/stdout

Matt McCutchen matt at mattmccutchen.net
Mon Jun 2 22:08:54 GMT 2008


On Mon, 2008-06-02 at 14:59 -0700, Tony Mantler wrote:
> > > On Mon, 2008-06-02 at 13:45 -0700, Matt McCutchen wrote:
> > > > First, you should use an rsync daemon if you aren't already; with the
> > > > remote shell mode, you have to get the server arguments across the
> > > > socket yourself, whereas the daemon protocol takes care of that.

> Well, when operating in the 'rsh'-like mode, rsync passes a bunch of
> arguments to my program which my program hands across to the other side
> to invoke the remote-side rsh.
> 
> What I need to do is turn this whole thing inside out, so that my
> program launches rsync rather than rsync launching my program. The
> reason for this is that my program needs to operate as a plugin as well
> as standalone.

Right.  I was suggesting an rsync daemon for the inside-out case where
you can't easily pass the server arguments using your program.

> > > > In the absence of this enhancement, you can accomplish the same thing
> > > > using the RSYNC_CONNECT_PROG environment variable [...]
> > 
> > > > RSYNC_CONNECT_PROG='cat >&3 & cat <&3; wait' rsync -a foo::module/src/ dest/
> > 
> > > That probably won't work very well in my case.
> > 
> > Why not?  It does exactly the same thing as the enhancement would, but
> > with slightly higher overhead to pass the data back and forth.
> 
> Well, it won't work on windows for one thing, and that's apparently one
> of my target platforms. (not by choice, I assure you)

It might work under Cygwin, but you're right, that's iffy.  I suggest
you compile your own rsync with the proposed patch:

https://bugzilla.samba.org/attachment.cgi?id=3116&action=view

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/rsync/attachments/20080602/973cbebd/attachment.bin


More information about the rsync mailing list