ZZW原創_rsync同步時由於注釋問題引起的@ERROR: chdir failed


 

1、需求:A機器同步文件到B機器

 

2、問題: A機器執行如下命令:

[root@sv0379 rsync]# rsync -vzrtopg  --password-file=/usr/local/rsync/rsync.passwd /opt/aspire/product/pcc_cs21/LOCAL_PccFTP/PCC_666_local/components_yml/localAbsoluteTempPath/   backup@10.12.8.245::components_localAbsoluteTempPath
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

3、B機器rsyncd.conf 文件配置

[root@linux245 rsync]# vi rsyncd.conf
uid = root
gid = root
use chroot = no
max connections = 4
strict modes = yes
hosts allow = 10.12.3.25 #可以空格,允許多個
port = 873
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log

[components_localAbsoluteTempPath]
path = /opt/aspire/product/pcc_sh21/LOCAL_PccFTP/PCC_666_local/components_yml/localAbsoluteTempPath #當前機器要同步到此的目錄
#path = /usr/local/rsync
ignore errors = yes
read only = false
list = false
auth users = backup
uid = pcc_sh21
gid = pcc_sh21
secrets file = /usr/local/rsync/rsyncd.passwd

4、問題解決

將rsyncd.conf 文件中的 #當前機器要同步到此的目錄 這個注釋刪除掉,問題解決


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM