[wellylug] Rsync

Ewen McNeill wellylug at ewen.mcneill.gen.nz
Wed Dec 14 10:54:17 NZDT 2005


In message <200512141028.09592.e.chalaron at xtra.co.nz>, "E.Chalaron" writes:
>I managed to use Rsync with SSH, but a/ it is an overkill and b/ running it in 
>a crontab may probably not work because of the pasword. [...]
>sync -az --stats --rsh=ssh rimutaka:/home/movies /home/work

You'll either need to (a) set up ssh keys (without passphrases, or with
some authentication agent scheme) or (b) use the rsync daemon mode
instead.  For the latter you want a destination/source something like:

rimutaka::movies

where the first part is the name of the host to connect to, there are
_two_ colons, and the second part is the name of a configuration entry
in /etc/rsyncd.conf, which would look a bit like this:

[movies]
  path=/home/movies
  use chroot=true
  uid=whatever
  gid=whatever
  hosts allow=source-host
  hosts deny=0.0.0.0/0

There are lots of other options you can specify; see the rsync
documentation for more.  

And of course you need to run "rsync --daemon" either stand alone or out
of (x)inetd; your distribution probably supports this out of the box
(most modern ones seem to).

The main catch with the rsync daemon mode is that it doesn't do
encryption; but if you're doing it over a trusted LAN, or already have
encryption sorted out (eg, VPN, or perhaps stunnel) then that's not a
big deal.  I do most of my backups through a VPN using the rsync daemon
mode.

Ewen




More information about the wellylug mailing list