How to Rsync files from source server with port number

For those who need a quick syntax for copying files via rsync from source server requiring a port number. please see below…

rsync -e ‘ssh -p [port number]’ -avzp [user]@[host or domain]:[source folder path] [localpath]

Example:

rsync -e ‘ssh -p 11401′ -avzp [email protected]:/var/www/html/ /var/www/html/

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>