As rsync
will not accept to be given a custom port on the destination address, a way around it is to initiate an ssh
connection that will handle it for you:
1 | rsync -e 'ssh -p 2222' $SOURCE_DIR $DEST_DIR; |
This post is also available in: Greek