17.24 Rsync Server

REVIEW An rsync server can serve files to a remote rsync command. Simply install the rsync package then copy /usr/share/doc/rsync/sample-rsyncd.conf.gz to /etc/rsyncd.conf.

Logging can be turned on by editing the file:

log file=/var/log/rsyncd
... 
        transfer logging = yes

To access the server port 873 (by default) needs to be opened through the firewall. Then add the following line to /etc/inetd.conf:

rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon

Restart inetd by sending it a HUP signal.

The rsync server works with modules. Modules are defined in the configuration file. A list of modules is returned from an rsync server when the server is queried:

$ rsync datamining.togaware.com::
linuxbook     Graham's GNU/Linux Desktop Survival Guide

For each module (linuxbook in the above) you identify its configuration, including a path to where it lives, for example:

[linuxbook]

        comment = Graham's GNU/Linux Desktop Survival Guide
        path = /var/www/linux/book
        read only = yes
        list = yes
        uid = nobody
        gid = nogroup
        transfer logging = yes
... 

To get a directory listing from an rsync server:

$ rsync datamining.togaware.com::linuxbook/

To have your local server start up at boot time add the following to /etc/inetd.conf:

rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon

After editing the /etc/rsyncd.conf file be sure to send the process a HUP signal.



Your donation will support ongoing availability and give you access to the PDF version of the book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.