rsync 操作日记

一.服务器配置
1. yum install rsync
vim /etc/xinetd.d/rsync
disable = no
2.vim /etc/rsyncd.conf


log file = /var/rsyncd.log
pid file = /var/rsyncd.pid
lock file = /var/rsyncd.lock
secrets file = /etc/rsyncd.pas
motd file = /etc/rsyncd.motd
read only = no
hosts allow = *
list = yes
uid = root
gid = root
use chroot = no
max connections = 30
[bak]
path = /home/zrb/tmp
comment = www bak
auth users = root


3. vim /etc/rsyncd.pas
root:pawwrord
chmod 600 rsync.pas
4./etc/rsyncd.motd
go
5.rsyncd --daemon 


6.ps aux | grep rsyncd


二.客户端配置
配置rsync client
1、设定密码
# vi /etc/rsync.pas
111111
修改权限
# cd /etc
# chown root.root rsync.pas
# chmod 600 rsync.pas
 
2、client连接SERVER
  从SERVER端取文件
# rsync -vzrtopg --progress --delete root@192.168.10.133::bak /home/testSync/ --password-file=/etc/rsync.pas
 
  向SERVER端上传文件
# rsync -vzrtopg --progress --password-file=/etc/rsync.pas  /home/testSync/ root@192.168.10.133::bak


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值