Can you run rsync over a pipe?

Seann Herdejurgen seann at herdejurgen.com
Sat Mar 22 08:58:03 EST 2003


Can rsync be run over a pipe like tar does?  For example, I can use tar like this:

    tar cf - files | ssh host '(cd /dir; tar xf -)'

I want to transfer a bunch of files using rsync (over SSH) every few seconds, but the overhead of
setting up/tearing down the SSH connection is killing me.  So, what I want to do is setup a
persistent SSH connection as a pipe (or maybe a named pipe) that I can use to rsync to and have a
receiving rsync on the target host.  I notice that when I run rsync to a remote host, it starts up a
process that looks like:

   rsync --server -vlogDtprz --delete . /dir

What command do I run on the sending side to talk to this rsync process on the remote box?  The
--server option is not listed in the rsync man page.

In other words:

    <magic command> | rsync --server -vlogDtprz --delete . /dir

What is the magic command on the left hand side?

Please e-mail me directly as I am not subscribed to the list.

Regards,
Seann Herdejurgen


More information about the rsync mailing list