I want to transfer files from a Windows server running rsyncd to a local
Linux machine. It has no SSH, so I can't use keys.
I need credentials to access files on the rsyncd server, so I thought
using "expect" to pass a password in a script is the obvious choice:
/usr/bin/expect <<!
set timeout -1
spawn rsync --partial -a rsync://[EMAIL PROTECTED]/share/dir /local/copy
expect "Password: "
send "secret_password\n"
expect
!
However, this has a drawback that I loose the exit code produced by
rsync (I'm no expect guru, so maybe perhaps there is a workaround to that).
What is the recommended way to copy files from a (password-protected)
rsyncd server in a script?
--
Tomasz Chmielewski
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html