Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to use tar cf - | ssh user@hostname tar xf - to copy a very large set of files. The only problem is that it will be over a very flakey VPN link. Is it possible to somehow set up a resumable transfer like this? I would use rsync, but I'm not sure how to do it because the way the SSH keys are organized means the copy destination must initiate the command.

share|improve this question
    
Rsync certainly should work, I wouldn't spend any time on trying on tar, and strongly suggest that you should be spending your time on making rsync work for you. –  Zoredache Sep 7 '12 at 17:07

1 Answer 1

up vote 0 down vote accepted

You can still use rsync from the "destination".

Here is the command to run on the destination server.

rsync -avz <username>@source.com:/path/to/backup /local/path/to/copy/backup/to

Replace the and of the source server where you want to copy data off of.

You do not need rsync "server" running on the remote host. This happens transparently to the end user as long as your ssh to the source server works.

Just run the command as-is and rsync will work over ssh from destination copying data from source.

share|improve this answer
    
Mustn't an rsync server be running on source.com in this situation though... I don't get to install stuff or run services on source.com as it is a client's server. –  sirlark Sep 7 '12 at 17:25
    
When using SSH as a transport, you don't need a running rsync server. You simply need the rsync to be installed. Rsync over ssh will temporarily start rsync as a daemon on the remote side over the SSH pipe. –  Zoredache Sep 7 '12 at 17:27
    
Fantastic, rsync is at least installed :) –  sirlark Sep 7 '12 at 17:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.