Tuesday, January 5, 2010

Continue stalled scp file transfer session

Stalled scp file transfer session will happen when the network connection is unstable. You can see the status of the session at the message shown at your stdout like below:

file1 3% 136MB 0.0KB/s - stalled -

To continue back the file transfer, you can use this command at a new terminal, but make sure both the server and client have rsync installed:

$ rsync --partial --progress --rsh=ssh username@server:/path/to/remote-file /path/to/local-file

For example, if the transfer of file1 is stalled for user abu:

$ rsync --partial --progress --rsh=ssh abu@master:/home/abu/file1 /home/abu/file1

The scp transfer process will continue transferring the file

file1 4% 136MB 300.0KB/s 2:03:17 ETA


Anonymous said...

Thanks, this is a great tip!

Anonymous said...

Worked perfectly, thanks!