How to Resume Download/Upload over SSH

psftp (part of putty) can resume transfer over SSH.

Connect to ssh host:

$ psftp user@host

List files and folders:

psftp> ls

Download a file:

psftp> get test.zip

If the transfer broken, it can resume by reget command:

psftp> reget test.zip

Download folder recursively:

psftp> get -r testdir

Resume folder downloading:

reget -r testdir

Upload a file:

psftp> put test2.zip

If transfer broken, it can resume by reput command:

psftp> reput test2.zip

Alternative: rsync

Download a file with resume support:

$ rsync --partial --progress --rsh='ssh -p 22' user@host:/remote/path/test.zip  /local/path

Upload a file with resume support:

$ rsync --partial --progress --rsh='ssh -p 22' test.zip user@host:/remote/path

Download a folder recursively with resume support:

rsync -v -r --partial --progress --rsh="ssh -p 22" user@host:/path/to/remote/folder/  /path/to/local/folder/

Upload a folder recursively with resume support:

rsync -v -r --partial --progress --rsh="ssh -p 22" /path/to/local/folder/  user@host:/path/to/remote/folder/

Share Share Editor: editor | Posted: 2014/05/21 | Views: 3467

Comments

8 + 14 =
Home | Search | Contact | Terms
Editor