FAQ: Moving files between two machines using rsync
Andrew Liles
andrew.liles at starfishzone.com
Mon Feb 16 21:01:36 GMT 2004
Although not an rsync expert, I think your problem is in the way you
reference the remote machine.
rsync will either work on a remote machine gaining access via a shell
(which SSH recently became the default) or will use the rsync daemon.
Firstly, your configuration steps so far have setup an rsync daemon so you
should have specified the syntax to connect to the daemon. This is achieve
with a double colon "::" as opposed to the normal single colon.
Secondly, if you use the the rsync demon you must refer to a "module" which
in your case is "tmp" which just happens to be the same as the directory
name. The syntax for referring to a module does not include a leading slash.
So I suggest you try the following - just 1 character different:
rsync -vz \
--password-file=/export/home/raub/nogo \
/export/home/raub/sync-me \
raub at katri::tmp
At 16:18 16/02/2004, Mauricio Tavares wrote:
> 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?
>
>--
>To unsubscribe or change options:
>http://lists.samba.org/mailman/listinfo/rsync
>Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
More information about the rsync
mailing list