Uploading a stalled file using scp

If you were copying/uploading a file using SCP, and the connection got lost… bad news, you cannot continue uploading it using SCP. This command will upload it again from the beginning, so if the file was 2GB, and you already uploaded 1 and a half gigs, you are f***… in trouble

The good news is that there is a “trick” to continue uploading, the trick is named rsync:

rsync -rsh=ssh --partial --progress <src-path> <dest-path>

or, the short format:

rsync -rsh=ssh -P <src-path> <dest-path>

Hope you find it useful, as I did 😉

Trackback URL

, ,

Comments are closed.