Matko Klaic Matko Klaic - 5 months ago 23
Linux Question

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

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 ?

Answer

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

In general the order of args for rsync is

rsync [options] SRC DEST