rsync

 八周二次课(9月19日)
10.28 rsync工具介绍
10.29/10.30 rsync常用选项
10.31 rsync通过ssh同步


10.28 rsync工具介绍

rsync增量同步

rsync -av /etc/passwd /tmp/1.txt

sending incremental file list

passwd


sent 2165 bytes  received 31 bytes  4392.00 bytes/sec

total size is 2091  speedup is 0.95

rsync

V可视化。

rsync -av /etc/passwd [email protected]:/tmp/1.txt远程拷贝。

10.29/10.30 rsync常用选项

rsync

-a包含-rtplgoD

rsync

a里面包含了l如果在a后面加上L则l失效

rsync

--delete会把目的文件夹里面多余的删掉。

--exclude "*.txt" 把 包含.txt的过滤掉

-P可以加上显示的比v更加详细

rsync

远程同步使用方法

 rsync -avP -e "ssh -p 24" ./aming/ 192.168.230.133:/tmp/123/ 指定端口


本文转自 zfno11 51CTO博客,原文链接:http://blog.51cto.com/zfno111/1967294