1、準備web
1.目標:從192.168.0.1上把/app/web/cnblogs.com/data下文件同步到192.168.0.2下的/app/web/cnblogs-slave.com/data;bash
2、安裝啓動app
1.修改192.168.0.2上的/etc/rsyncd.conf文件blog
[cnblogs_data] comment=cnblogs slave path=/app/cnblogs.com/data/
2.獨立啓動192.168.0.2的rsync服務同步
/usr/bin/rsync --daemon
3.在192.168.0.1上運行it
rsync -avH --progress ./app/cnblogs.com/data/attached --port=873 site_syncer@192.168.0.2::cnblogs_slave1 --password-file=/etc/rsyncd/rsyncd_192.168.0.2.password