rsync配置

/etc/rsyncd/Rsyncd.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

address = 192.168.100.3

uid = audit

gid = audit

auth users = audit

secrets file = /etc/rsyncd/rsyncd.secrets

#incoming chmod = u+rwx,g+rwx,o+rx

use chroot = yes

read only = no

 

#limit access to private LANs

hosts allow=192.168.96.0/255.255.255.0

hosts deny=*

max connections = 500

 

#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

 

log format = %t %a %m %f %b

syslog facility = local3

timeout = 300

 

[app]

path = /app/audit(目标目录)

list=yes

#ignore errors

 

/etc/rsyncd/rsyncd.secrets 配置

audit:skymobi(密码)

 

启动服务端/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf

 

 

 

客户端:

/etc/rsync_client.pass

Skymobi(密码)

rsync -av --password-file=/etc/rsync_client.pass /usr/local/httpd/htdocs/sms/vsms/sessions/ [email protected]::app

如果害怕把带宽跑满就加上限速功能

--bwlimit=KBPS limit I/O bandwidth; KBytes per second

你可能感兴趣的:(配置,liunx,rsync)