同步

*/60 * * * * /bin/sh /root/run/sh/rsyncincre.sh >/dev/null 2>&1

 

vim /root/run/sh/rsyncincre.sh

#!/bin/bash
#Purpose:rsyncd
#Author
#Date:yyyy-mm-dd

Src_Dir="/data/"
Des_Host="IP"


rsync -avzP --progress --password-file=/etc/rsyncd/data.pwd \
--exclude-from=/etc/rsyncd/sh/exclude/rsync.exclude \
$Src_Dir user@${Des_Host}::data

 

vim /etc/rsyncd/sh/exclude/rsync.exclude

confluence/backups        相对路径

 

posted on 2018-03-27 16:33  xianguang  阅读(103)  评论(0编辑  收藏  举报

导航