linux rsync 命令

1.配置服务端的rsyncd.conf文件

#rsync 服务端配置
#gid = users
#read only = true
#use chroot = true
#transfer logging = true
#log format = %h %o %f %l %b
#log file = /var/log/rsyncd.log
#pid file = /var/run/rsyncd.pid
#hosts allow = trusted.hosts
#slp refresh = 300


#[Example]
# path = /home/Example
# comment = An Example
# auth users = user
# secrets file = /etc/rsyncd.secrets




uid = nobody
gid = nobody
use chroot = no
#客户端最大连接数
max connections = 4
#PID及LOCK文件位置
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
#日志文件位置
log file = /var/log/rsyncd.log


#设置可以镜像的目录及相关#认证的模块名,在client端需要指定
[webappstore]
#可以镜像的目录
path =/web/storeSales
#对用途的说明
comment = webappcomment
#服务器上的目录及文件可写
read only = true
list = false
#允许进行rsync的客户端网段或IP
#hosts allow=192.168.200.0/24,外地IP地址
hosts allow=10.1.245.24,11.205.32.141

2.客户端调用

rsync -vzrtopg --progress --exclude "WEB-INF/classes/config.properties" --exclude "WEB-INF/web.xml" --exclude "WEB-INF/classes/config/sqlMapConf.xml" weblogic@10.1.245.25::webappstore /web/storeSales


备注:红色字体为客户端的用户
蓝色字体为服务端的ip及镜像目录
紫色字体为客户端的绝对路径














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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值