通过rsync向指定的ssh端口同步数据

rsync -av -e 'ssh -p 2222' /home/svn/repos2/ smzz.org:/home/zhouguoqiang/svn/repos/

这样即便远程ssh不是默认的22端口,也可以通过rsync同步文件

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options