Resume secure copy scpresume
Written by Walter
Yesterday needed to sync two laptops. Started a big copy but it did not finish in time before I had to leave. So what now?
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 exactly the same but this time it will skip the copied documents and resume the partial uploads. Hooray, exactly what we needed ;)