Rsync 命令练习:
1===/usr/bin/rsync –avrl --progress –delete –e ssh –exclude-from=”exclude.txt”/tripb2b.com/ www@10.0.${ip}:/aidu.com/2 >/dev/null
2===rsync -e -ssh -azvP --delete /var/www/html/ root@172.17.0.7:/web_back/
其中的用户名也可以更改的,一般情况下是不用ROOT 的。
3===rsync指定端口传数据
rsync -arv -e 'ssh -p 100' source-file remotehost:/target-path
转载于:https://blog.51cto.com/study2008/1854634