How to specify private key along with rsync command

Some servers are restricted to login using the private key only. In such situations the same key need to be specified along with rsync command.

#rsync -rav -e "ssh -i PATH-TO-KEY" USER@HOST:/SRC/ /DEST/

Where PATH-TO-KEY need to be replaced with the exact location of key file, USER with the username of remote server, HOST with the ipaddress of the remote server, SRC with the path to the remote folder and DEST with the local destination folder.

That's all…