How to know the remote version of rsync daemon?

Wayne Davison wayned at samba.org
Thu May 4 01:54:47 GMT 2006


On Wed, May 03, 2006 at 12:13:49PM +0200, Pirla wrote:
> is possible to know what version is executed on one server?

There is no direct way to get this info via the rsync daemon protocol.
You can sometimes try to narrow it down by using some of the newer
options and seeing if they work or not.  For instance, try this rsync
command using at least rsync 2.6.7 on the local machine (choose any
local file and a remote module on the host you want to figure out):

    rsync -vvvv --dirs --delete --dry-run some-file host::module

The -vvvv will show you the protocol number:

    (Client) Protocol versions: remote=29, negotiated=29

Refer to the OLDNEWS file to see what rsync releases had what remote
protocol version.  In this case, a remote=29 means that the remote
rsync is at least 2.6.4.  If you get back this error:

    rsync: on remote machine: --no-r: unknown option

then the rsync is older than 2.6.7 (you can get rid of the -vvvv if
you're having a hard time finding the error among the other messages).

If you see an error like one of these:

    ERROR: module is read only
or
    rsync: The server is configured to refuse --delete

or no error at all, then the remote machine is 2.6.7 or 2.6.8.

If you want to distinguish 2.6.4 from 2.6.5/2.6.6, try this command:

    rsync --only-write-batch=batch_name some-file host::module

If you see this error:

    rsync: on remote machine: --only-write-batch=X: unknown option

then the remote system is running 2.6.4.

There might be similar tricks to figure out older rsyncs (those with an
older remote protocol version), but I'll leave it at that for now.

..wayne..


More information about the rsync mailing list