You can use rsync
to resume a broken scp transfer.
rsync -P -rsh=ssh file.tar remote:file.tar
rsync -P -rsh=ssh remote:file.tar file.tar
--partial keep partially transferred files
--progress show progress during transfer
-P same as --partial --progress
Background
Assuming you want to push a big file to a remote server and for some reason the connection broke.
It would be a pity to loose all of the already transferred bytes and you might wonder, if there is not
a way to resume a failed scp
transfer. While scp
cannot do that, rsync
can take on a failed transfer.
Using one of the methods above allows you to resume a failed transfer.