Posts Tagged ‘scp’

Resume (secure) copy

Thursday, February 11th, 2010

If you need to transfer big files, sometimes the network connection breaks down and you need to restart the transfer. Using the following command, you can start and resume (!) a file transfer:

rsync --partial --progress --rsh=ssh localFile username@remoteMachine:remoteDirectory/

If you generally want to use the above command add the following line to your ~/.bashrc and just use the new scpresume command:

alias scpresume="rsync --partial --progress --rsh=ssh

Many thanks to Joen.dk who came up with the idea!