rsync is a great swiss army knife for all kinds of uses. as such, it is fairly complex. here are a few neat tricks.
rsync as a server¶
for security, rsync is typically used over ssh. suppose, however, that you wanted a read-only, publicly accessible repository. kind of like a public ftp site, but with the advantages of rsync.
# apt-get install rsync
bc. myshare1] path = /home/me/share1 comment = some stuff use chroot = yes read only = yes bc. myshare2] path = /home/me/share2 comment = some more stuff use chroot = yes read only = yes
rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon
bc. # /etc/init.d/inetd restart
now, on the client side, you whould grab one of the repositories like so:
bc. client> rsync theserver::myshare1 .
if you wanted to see what was available, leave off everything after ::
client> rsync theserver:: myshare1 some stuff myshare2 some more stuff
rsync over ssh without password¶
On both machines:
bc. > apt-get install ssh rsync
To get rsync over ssh working without specifying a password, you need to
put an authorized key on the machine you want to connect to.
See ssh keys for more information.