linux下安装使用rsync
linux下安装使用rsync
先安装rsync
然后find / -name "rsync" 找到安装的文件
创建rsync的相关配置文件
mkdir /etc/rsync
vi rsync.conf
# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help
# This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
port = 873 -www.2cto.com-
address = 172.23.1.1
#uid = nobody
#gid = nobody
uid = 0
gid = 0
use chroot = no
#limit access to private LANs
hosts allow=172.23.0.0/255.255.0.0 192.168.3.0/255.255.255.0
hosts deny=*
max connections = 5
motd file = /etc/rsyncd/rsyncd.motd
#This will give you a separate log file
#log file = /var/log/rsync.log
#This will log every file transferred - up to 85,000+ per user, per sync
#transfer logging = yes -www.2cto.com-
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
[同步]
path = /data/tongbu
list=yes
ignore errors
#auth users = user
read only = false
#secrets file = /etc/rsyncd/rsyncd.secrets
comment = back -www.2cto.com-
以上是我的配置文件,因为配置认证没有成功,所以没有配置认证同步了。以后再调试认证同步。
启动rsync
rsync --daemon --config=/etc/rsync/rsyncd.conf
修改防火墙,开放tcp 873端口
vi rsync.secrets
user:password
客户端:
rsync.exe -uvzrtopg --progress --delete /cygdrive/d/work/ user@172.23.1.1::tongbu
作者 lnwu
评论暂时关闭