FAQ: Moving files between two machines using rsync

Mauricio Tavares raub at afn.org
Mon Feb 16 16:18:02 GMT 2004


        Easy rsync question:  to try to learn a bit of rsync, I am setting
up katri (netbsd box) as my rsync server (where I would sync to) and
kushana (Solaris 9 box) as the machine I will be syncing from.  BTW, both
are in my LAN and their respective /etc/hosts know their names, with or
withoug the domain part.  So, in katri, I have:

katri# cat /etc/rsyncd.conf
motd file = /etc/motd
max connections = 25
syslog facility = local3

[tmp]
        comment = temporary file area
        path = /tmp
        read only = no
        list = yes
        hosts allow = kushana
        auth users = raub
        secrets file = /etc/rsyncd.secrets


katri# cat /etc/rsyncd.secrets
raub:pogoland
katri#

<The password here is just something to get me going; I can change it to
something better down the line =) >

I also added rsync to /etc/services and /etc/inetd.conf:

katri# grep rsync /etc/services
rsync           873/tcp                 # Rsync server
katri# grep rsync /etc/inetd.conf
rsync           stream  tcp nowait      root    /usr/local/bin/rsync
rsyncd
--daemon
katri#

But, just to be paranoid, I decided to run it manually in server mode:

katri# ps aux | grep rsync
root  8610  4.8  1.5  372  616 ?? Ss   11:00AM   0:00.42 rsync --daemon
root  8612  0.0  0.6  128  232 p0 R+   11:00AM   0:00.17 grep rsync
katri#

In kushana, I created a password file, nogo:

raub at kushana-30>cat /export/home/raub/nogo
pogoland
raub at kushana-31>

and am going to try to move the file /export/home/raub/sync-me to
katri:/tmp.
This is what I did and what I got back:

raub at kushana-29>rsync -vz --password-file=/export/home/raub/nogo
/export/home/raub/sync-me raub at katri:/tmp
katri.kushana.com: Connection refused
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)
raub at kushana-30>

What I am doing wrong here?



More information about the rsync mailing list