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 email@example.com:
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 firstname.lastname@example.org:
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 ;)