/usr/bin/rsync -vzrtopg --delete --ignore-errors ssh /data/htdocs/se6skin.admin.browser.qihoo.net/cf/ sync360@10.121.211.72:/home/q/system/skin.se.360.cn/cf/
--delete 删除那些接收端还有而发送端已经不存在的文件
--ignore-errors 即使出现 I/O 错误也进行删除 加上这个参数是为了解决如下错误:
building file list ... rsync: link_stat "/data1/htdocs/se6skin.admin.browser.qihoo.net/cf/ssh" failed: No such file or directory (2)
done
IO error encountered -- skipping file deletion
sent 351 bytes received 20 bytes 742.00 bytes/sec
total size is 632893 speedup is 1705.91
rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
本文转自 陈小龙哈 51CTO博客,原文链接:http://blog.51cto.com/chenxiaolong/1836090