Really cool remote file copying trick
So I was trying to copy a really huge (about 4 gigs) file from my laptop up to my web server, using a simple and standard command:
scp local_file_name username@remoteserver.com:remote_file_name
When I got about 10% through, I began to worry what would happen if the transfer failed somewhere way down the line. (It claimed it would take 4 and a half hours.) So I googled “scp resume” to see if there was anything to be done. Sure enough, I found several blog posts suggesting this command:
rsync --partial --progress --rsh=ssh local_file_name username@remosthost.com:remote_file_name
So, worried to potentially waste a bunch of time if the scp failed at 95% or something, I just canceled it and expected to have to re-do the 10% that was already done.
The coolest part? The canceled scp left the portion of the file already transfered, and the new rsync command was happy to resume that transfer.
So it’s not only a resume-friendly alternative to scp, it’s actually a rescue method for failed scp transfers. Cool!
