### 后台机器


    yum install -y rsync

    

    #port=873

    log file=/var/log/rsync.log

    pid file=/var/run/rsyncd.pid

    #address=192.168.0.10

    [test_model]

    path=/data/sql/

    use chroot=true

    max connections=4

    read only=no

    list=true

    uid=root

    gid=root

    auth users=test

    secrets file=/etc/rsyncd.passwd

    hosts allow=192.168.17.213

    

    

    cat /etc/rsyncd.passwd

    test:test123


    chmod 600 /etc/rsyncd.passwd


    rsync --daemon --config=/etc/rsyncd.conf #启动

    

    检查日志,端口

    

### 客户端


    yum install -y rsync

    cat /etc/rsyncd.passwd

    test123

    

    chmod 600 /etc/rsyncd.passwd


### 传输文件

    rsync -vzrtopg  --progress  --password-file=/etc/rsync.passwd Discuz_X3.2_SC_UTF8.zip test@192.168.17.197::test_model


### 关闭


 ps -ef | grep rsync

 kill 11111