Rsync daemon: is it really useful?
Solution 1:
I think the big difference is that if you're using rsyncd
on the server end, instead of rsync
over ssh
, the server already knows what it has, so building the file lists to determine what needs to be transferred is much simpler. It won't make a difference if you're just pushing around a few files, but if you're making, for example, CPAN available over rsync, you don't want to have to build the file list on the source side every time.
Solution 2:
This is an old question, but there is another very valid reason for using rsync
in daemon mode versus over ssh:
- Lower CPU overhead.
I have one 10 TB NAS that is backed up to another 10 TB NAS, and the encryption overhead for just the SSH tunnel is the limiting factor for the transfer. Both NASes are fairly low-powered 1.8 Ghz Intel Atoms, and even with easier crypto options for ssh (e.g. ssh -c arcfour
passed as the ssh call to rsync), the encryption overhead still results in at best 200-300 Mbps, on a gigabit ethernet network.
Using a rsync daemon on one end removes the crypto overhead, and achieves >800 Mbps transfers for large, contiguous files.
Solution 3:
I don't think comparing running rsyncd to rsync over SSH makes much sense. They are generally used for completely different things.
rsync over ssh is usually used for backups, or syncing servers over the internet. rsyncd is usually used for things like software mirrors, so it makes more sense to compare rsyncd to a plain HTTP or FTP mirror or even bittorrent.
There is also software like zsync, which allows you to get many of the benefits of rsync while still using a standard HTTP server
Solution 4:
rsyncd (rsyncd with daemon) uses by default port 873.
This will use the native rsync protocol, but does not encrypt anything. It is meant only for local or trusted networks.
If you want security, always you have to use rsync or rsyncd over SSH, all your data transfers will be entrypted by the ssh protocol.
Solution 5:
The function of rsyncd
is to run on a server and respond to (remote) rsync
requests.
(when we say rsyncd
we mean rsync
running as a daemon, and when we say 'remote', we mean remote from the point of view of the machine running rsyncd
)
Both would use ssh in order to talk to each other securely.
It's not really a question of using one or the other, although if rsync
is used to copy files and directories on the same machine, I don't think it needs to run as a daemon.
I think the rsync
man page clarifies this.