Bu Blogda Ara

9 Mayıs 2011 Pazartesi

rsync with ssh for resumable scp behaviour

Dont you get annoyed when you have a fragile vpn or internet connection to a site where you are trying to download a large file via scp and the transfer is broken on the half way or even when you are about to finish %99 lol.

So this happened to me these days so I discovered rsync with ssh option to continue downloading from where just the download was interrupted.

sudo rsync --partial --progress --rsh=ssh username@ipaddress:/path_to_file /path_to_target_folder

If you have a different port than default ssh port

sudo rsync --partial --progress --rsh='ssh -p12321' username@ipaddress:/path_to_file /path_to_target_folder

Note: This also works after when scp transfer was broken. You still continue to download from where you remained.