Resume secure copy scpresume

Written by Walter on 2/12/2009

< >

Yesterday needed to sync two laptops. Started a big copy but it did not finish in time before I had to leave. I did:

scp -r Pictures Documents cppWork rubyWork wschrep@

But after about 4Gig I had to stop transferring. The total was 6Gig but then it hit me that scp does not have a resume function. Luckily after some googling there is a really simple solution, use rsync with an alias to mimic scpresume:

alias scpresume="rsync --partial --progress --rsh=ssh"

After this alias I can now enter:

scpresume -r Pictures Documents cppWork rubyWork wschrep@

So the arguments are exactly the same but this time it will skip the copied documents and resume the partial uploads.

Hooray, thanks to rsync we got exactly what we needed ;)

Back to archive