Redhat rsync配置

一、服务端

  1、设置rsync配置文件

max connections = 10
pid file = /home/user/rsync/rsyncd.pid
lock file = /home/user/rsync/rsyncd.lock
log file = /home/user/rsync/rsyncd.log
port = xxxx
[backupfile]
        path = /home/user/backup/
        comment = backupfile
        read only = yes
        list = no
        hosts allow = ip/24
                                uid=user
                                gid=group
                                use chroot = no
        auth users = user
        secrets file = /home/user/rsync/rsync.secrets

  2、设置密码文件,并赋600权限,密码文件内容格式: user:password

  3、启动,rsync --daemon --port=xxx --config=/home/user/rsync/rsyncd.conf

二、客户端

  1、设置密码文件,并赋600权限,密码文件内容格式: password  

  2、同步命令:rsync -av --password-file=/home/oracle/backup/rsync.secrets --delete --port=port user@IP::backupfile/ /backup/112backup/

posted @ 2018-07-05 19:56  lennyT  阅读(526)  评论(0)    收藏  举报