配置备份服务器:
#cat /etc/rsyncd.conf
# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help
# This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
uid=root
gid=root
read only = true
use chroot = true
transfer logging = true
max connections = 1
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
hosts allow = 192.168.1.161,127.0.0.1
auth users = backup
secrets file = /etc/rsync/rsyncd.secrets
[source]
path = /common/source
# cat /etc/rsync/rsyncd.secrets
username:passwd
# chmod 600 /etc/rsync/rsyncd.secrets
#mkdir /common/source
#chkconfig xinetd
#service xinetd start
#service rsync start
#netstat -a | grep rsync
tcp 0 0 *:rsync *:* LISTEN
客户端设置: 这里就是本机
# echo "passwd" > /root/psw.txt
# chmod 600 /root/psw.txt
本地测试连接:
#rsync -avz -progress -delete --password-file=/root/psw.txt /var/log username@127.0.0.1::source
提示错误:
rsync: Failed to exec lete: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(83) [sender=2.6.8]
rsync: writefd_unbuffered failed to write 12 bytes [sender]: Broken pipe (32)
rsync error: error in rsync protocol data stream (code 12) at io.c(1119) [sender=2.6.8]
大家有什么建议吗?
2 个解决方案
#1
# rsync -arczv -delete --password-file=/root/psw.txt /var/log username@127.0.0.1::source
Hello Rsync Client
@ERROR: auth failed on module source
rsync error: error starting client-server protocol (code 5) at main.c(1296) [sender=2.6.8]
提示这个错误. 但是我看密码和用户名都没有错.
Hello Rsync Client
@ERROR: auth failed on module source
rsync error: error starting client-server protocol (code 5) at main.c(1296) [sender=2.6.8]
提示这个错误. 但是我看密码和用户名都没有错.
#2
添加系统用户就可以了. 不过还有一些参数搞不懂. 学习... 谢谢大家
#1
# rsync -arczv -delete --password-file=/root/psw.txt /var/log username@127.0.0.1::source
Hello Rsync Client
@ERROR: auth failed on module source
rsync error: error starting client-server protocol (code 5) at main.c(1296) [sender=2.6.8]
提示这个错误. 但是我看密码和用户名都没有错.
Hello Rsync Client
@ERROR: auth failed on module source
rsync error: error starting client-server protocol (code 5) at main.c(1296) [sender=2.6.8]
提示这个错误. 但是我看密码和用户名都没有错.
#2
添加系统用户就可以了. 不过还有一些参数搞不懂. 学习... 谢谢大家