`
中华国锋
  • 浏览: 41720 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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及镜像目录
紫色字体为客户端的绝对路径














分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics