Tuesday, August 7, 2007

Resuming a crashed scp transfer

Mercilessly robbed from here: http://joen.dk/wordpress/?p=34

scp doesn't have a resume option, so continue the transfer with rsync:

rsync --partial --progress source dest


This isn't encrypted like scp though, in order to do that you need to tell rsync to use ssh as it's shell. The following example uses rsync to transfer a file over ssh with ssh running on a nonstandard port on localhost (like you might setup with a tunnel):


rsync --partial --progress --rsh="ssh -p 2250 " -r  MyDirectory new@localhost:/media/stuff

No comments: