天天看點

rsync排除多個檔案同步

1、架構和說明

   把192.168.0.2上的檔案同步到192.168.0.3上,同時排除config.php和a.log檔案的同步。

2、通過rsync+ssh同步檔案

   (2)、在192.168.0.2執行下面指令

   rsync -avz --exclude config.php --exclude a.log -e ssh /data/httpd/dir [email protected]:/data/httpd/

   這樣/data/httpd/dir目錄排除了config.php a.log兩個檔案。其他檔案都會同步到192.168.0.3上。

<a href="http://www.055680.com/" target="_blank">城市物語</a>

    本文轉自yuangang_love 51CTO部落格,原文連結:http://blog.51cto.com/linux008/592661,如需轉載請自行聯系原作者

繼續閱讀