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.
1 Answer
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
tar zcf - /old/path | ssh user@host.tld "tar xzf - -C /final/path"
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.