• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
如今在丽江
不一样的要求
博客园    首页    新随笔    联系   管理    订阅  订阅
ZZW原创_rsync同步时由于注释问题引起的@ERROR: chdir failed
@ERROR: chdir failed rsync rsync error: error starting client-server protocol (code 5) at main.c(1503)

 

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 文件中的 #当前机器要同步到此的目录 这个注释删除掉,问题解决

posted on 2017-11-29 18:17  如今在丽江  阅读(5164)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3