originate sync from the daemon server

Matt McCutchen matt at mattmccutchen.net
Thu Sep 10 14:11:55 MDT 2009

On Thu, 2009-09-10 at 08:42 -0500, Kevin Kramer wrote:
> is there anything special to do this from the daemon server. I've setup 
> the /etc/rsyncd.conf with some filesystems and I would rather originate 
> (control) my rsyncs from this server and not from the hosts that have 
> the data I want. ie. I want to pull not push.

Then you don't need to run an rsync daemon on the machine that will be
collecting the data.  Just have that machine run ordinary rsync client
commands at the desired interval.

> what should my rsync line look like in a cron or command line
> /usr/local/bin/rsync -axS --delete --stats servername:/var/www/ www

It looks like that command is trying to copy directly to the daemon.
That would have to be written:

/usr/local/bin/rsync -axS --delete --stats servername:/var/www/ localhost::www


/usr/local/bin/rsync -axS --delete --stats servername:/var/www/ rsync://localhost/www

But that's the case known as "two remote endpoints" (even though the
daemon happens to be on the same machine), which the rsync client
currently doesn't support.  It needs one endpoint to be in the local
filesystem.  So you could bypass the daemon and do:

/usr/local/bin/rsync -axS --delete --stats servername:/var/www/ /snaps/www

The daemon options will need to be translated into appropriate options
to, or scripting around, this rsync command.  E.g., have a script that
runs rsync with --numeric-ids and then your "post-xfer exec" command.


More information about the rsync mailing list