Monthly Archives: January 2017

scp or rsync which one is better for linux & windows ?

Well there has been a debate about faster transfer with security. There would be people having different views on which command you should use for faster file transfer with security and some would also require to resync the data if there is some interruption during traffic etc.

From my side I have used scp and rsynch for remote copy but coming to the conclusion in terms of stablity and reliability I would suggest to go for rsync and not scp. scp can definitely score over rsync in file transfer as rsync build as file transfer list wherease scp just uses ssh protocol to copy the data and put it on remote.

#scp -r test alok@alok01:/opt

The above command would be more faster to copy test directory with alok credentials to servername say alok01  to /opt directory on remote host but what if your transfer breaks or interrupts you have to go back and start the copy again but in this case rsync comes into picture providing more stablity.

#rsync -avz test alok@alok01:/opt

The parameter -a also makes the copy recursive and preserve the modification times, but additionally it copies the symlinks that it encounters as symlinks, preserve the permissions, preserve the owner and group information, and preserve device and special files. This is useful if you are copying the entire home folder of a user, or if you are copying system folders somewhere else.z used for compressing the files while being transferred. Now suppose here your network halts or interrupts would you again do a rsync. Yes but rsync won’t copy the files which are already copied and save your time and patience.

Suppose from you remote host you have deleted any directory or file or updated anything you can always use –delete-after option to run rsync again after interrupted or new transfer too.

#rsync -avz –delete-after test alok@alok01:/opt

Hope this makes you understand when you should use rsync and when scp as per your convenience.

For windows you can always use cwRsync (https://itefix.net/cwrsync) for incremental copies,backups etc and also deltacopy (http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp). Winscp(https://winscp.net/eng/download.php) is alternative for windows being scp in Linux.

Feel free for any comments or queries.

Thanks & Regards,

Alok