Wednesday, December 21, 2011

rsync with port number

 rsync is a software application and network protocol for Unix-like and Windows systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction. rsync can copy or display directory contents and copy files, optionally using compression and recursion.
Trouble with rsync while transfering to a server with port number ??

Here is the correct syntax :
There are 2 ways to use this command.

1. If you are trying to transfer the files from remote server to your system then use the syntax below:

-----
rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/
-----
2. If you are trying to transfer the files from your system to remote server then use the syntax below:
-----
rsync -avz /local/path/ -e "ssh -p $portNumber" user@remoteip:/path/to/files/
-----

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews