Resuming scp file transfers

When downloading large files with scp, it is really annoying, if the download process stalls at 90+%, because it seems that you have wasted your time and scp leaves you with a broken file. Having encountered this problem, I was lucky enough to find this post which explains a remedy: Use rsync in order to complete the interrupted download.

Assume you downloaded a file with scp like this:

scp user@hostname:/path/to/file /local/path/to/downloaded/file

then you can continue the download as follows (note the –partial option):

rsync --partial --progress --rsh=ssh user@hostname:/path/to/file /local/path/to/downloaded/file

Rsync finds out that a large portion of the file is already there and continues where scp once has stopped.

Links

  • [1] Article with solution

Leave a Reply