Resuming an scp transfer
Did it ever happen to you that while you're scp'ing a huge file the connection drops and you have to start all over again? There are big chances that you know I'm talking about :)
Fear no more! Rsync can be used over ssh and it can resume the copy if a connection drop happens! Try it out:
rsync --rsh='ssh' -av --progress --partial --inplace sourcefile user@host:target
If you don’t want to remember the command line I’d suggest the following alias (add it to ~/.bash_profile
):
alias rscp='rsync --rsh=ssh -av --progress --partial --inplace'
Now you can transfer files via rscp using the same scp syntax.