Is there a way to continue broken scp (secure copy) command process in Linux?

LinuxSshCommand Line-Interface

Linux Problem Overview


I am copying 7.5 GB file to a remote server using scp command. At some point in time file transfer breaks and I have to start all over again.

Is the temporary amount of file being transferred completely lost ? Can I somehow restart the transfer from where it has stopped at previous attempt ? If not, is there some standard Unix command line file transfer command for doing that ?

Linux Solutions


Solution 1 - Linux

If you need to resume an scp transfer from local to remote, try with rsync:

rsync --partial --progress --rsh=ssh local_file user@host:remote_file

Short version, as pointed out by @aurelijus-rozenas:

rsync -P -e ssh local_file user@host:remote_file

In general the order of args for rsync is

rsync [options] SRC DEST

Solution 2 - Linux

This is all you need.

 rsync -e ssh file host:/directory/.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMatkoView Question on Stackoverflow
Solution 1 - LinuxTom McClureView Answer on Stackoverflow
Solution 2 - LinuxDigitalRossView Answer on Stackoverflow