2

I have multiple servers that receive files via rsync on different ports. I'd like to merge them into the same physical server and let the clients continue to direct their files to the same port they do now (ie different alternate ports).

Normally I'd just run /usr/bin/rsync --daemon --port=x for each one, but I'm trying to get it to work via xinetd in centos 6 since that's the 'default' rsync server now. Adding the ports in /etc/services didn't do it (it should have under inetd, but maybe not xinetd?). If I run the daemon manually and let xinetd run one it runs (so I'm not blocked to just get it done), but I'd still like them to both be run by xinetd. My question is can that even be done?

As a side thing, in man rsync:

--port=PORT
This specifies an alternate TCP port number for the daemon to listen on rather than the default of 873. See also the lqportrq global option in the rsyncd.conf manpage.

lqportrq doesn't show up in man rsync.d or a google search anywhere. what gives?

sebix
  • 4,313
  • 2
  • 29
  • 47
Jason Powers
  • 21
  • 1
  • 2

1 Answers1

1

You need to add additional xinetd configuration for each additional port you want to use. Each port needs a unique service name in /etc/services, so for example:

echo "rsync00 900/tcp" >> /etc/services

And then in /etc/xinet.d/rsync00:

service rsync00
{
        flags           = IPv6
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/rsync
        server_args     = --daemon --config /etc/rsync00.conf
        log_on_failure  += USERID
}
mgorven
  • 30,615
  • 7
  • 79
  • 122
  • This is it, thanks. I also needed to add --port=x to server_args in the new file. It's kind of frustrating that the default config doesn't kick out enough logs to troubleshoot, but I suppose redhat has to sell support somehow. – Jason Powers Jul 06 '12 at 23:06
  • 3
    It's not necessary to put the port in /etc/services, you can use `type = unlisted` and `port = 900`. – Pavel Šimerda Jun 11 '14 at 18:25