Resume SFTP transfer with PuTTY

Posted on 14.03.2009 by Kim N. Lesmer.

Not many SFTP clients support resume of broken transfers, but PuTTY does.

PuTTY is a small suite of console based applications for usage on the SSH, Telnet and Rlogin network protocols.

These protocols are all used to run a remote session on a computer, over a network. PuTTY implements the client end of that session: the end at which the session is displayed, rather than the end at which it runs.

While most other SFTP clients fail to support resuming a broken file transfer, the PSFTP client from PuTTY doesn't.

PuTTY runs on most operating systems including xBSD, Linux and Windows.

On FreeBSD you can install PuTTY using the pkg_add utility thus:

# pkg_add -r putty

On Debian GNU/Linux og Ubuntu GNU/Linux you can use the apt-get utility thus:

# apt-get install putty

If you are using Windows, you can download the binary (.EXE) file from the PuTTY website.

If a file transfer fails half way through, and you end up with half the file stored on your disk, you can resume the file transfer using the reget and reput commands. These work exactly like the get and put commands, but they check for the presence of the half-written destination file and start transferring from where the last attempt left off.

The syntax of reget and reput is exactly the same as the syntax of get and put:

reget myfile.dat
reget myfile.dat newname.dat
reget -r mydir

These commands are intended mainly for resuming interrupted transfers. They assume that the remote file or directory structure has not changed in any way, if there have been changes, you may end up with corrupted files. In particular, the -r option will not pick up changes to files or directories already transferred in full.