I need to download a directory from one server and place it into it's successor. The trouble is, the server is 97% full. So taring the files isn't an option. I need a method to transfer about 60 gigs from one server to another through ssh. The predecessor is centos and the successor is ubuntu.

  • 4
    Taring is always an option, especially if redirected to the ssh session. tar zcf - /old/path | ssh user@host.tld "tar xzf - -C /final/path"
    – Kondybas
    Sep 16, 2015 at 13:32
  • But am I going to need 60 gigs of hard drive space? Sep 16, 2015 at 13:33
  • 1
    No, archived and compressed stream will be streamed away to the new host. What you really need - is the stable reliable connection between hosts. And fast indeed.
    – Kondybas
    Sep 16, 2015 at 13:35
  • Oh no. It denied me because it uses rsa ssh keys. Sep 16, 2015 at 13:47
  • 2
    You can change the roles. ssh user@oldhost.tld "tar zсf - /old/path" | tar zxf - /new/path But you have to test that with some small dir to be sure everything is fine.
    – Kondybas
    Sep 16, 2015 at 14:47

1 Answer 1


Why not use rsync with archive and compression enabled? Something like this on the new server:

rsync -avz oldserver.domain:/path/to/dir  /path/to/new/dir

If rsync got interrupted for any reason (link dropped, alien attack, etc...), or some files got updated on the old server after copying, you can always re-run rsync with the update option u to resume the operation:

rsync -avuz oldserver.domain:/path/to/dir  /path/to/new/dir

(Make sure to check the manual page for more information man rsync )

  • I don't think rsync is the right solution. Does it send the files individually? is that why rsync is 3 times slower then tar zcf - ? Sep 17, 2015 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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