Link to home
Start Free TrialLog in
Avatar of erzoolander
erzoolander

asked on

RSync Question

I'm looking to migrate a bunch of stuff from one server to another - and I think rSync will be my best bet based upon what I'm reading.

A couple of questions before I proceed with it though:

1: Does rSync need to be installed on both servers due to the compression?  Or - is it fine if I just install it on the destination server and use that to fetch from the original server?  Kind of like:

rsync -avzhe ssh root@xxx.xxx.x.xxx:/var/www/ /localdestination/

Does that seem like a decent command to use - that will just grab everything in that directory/file permissions/etc?

2: Does rSync run in the background once it's launched from SSH - or do I need to keep the SSH terminal alive during the transfer?  I've used ncftp for stuff like this in the past - and there's a special flag you need to set to keep it running in the background.  Is rSync similar - or will it just go once you've set it going and I can close the terminal window?  There's about 3TB of data I'm transferring - and I'd hate to worry about keeping the connection alive the whole transfer.

Thanks!
Avatar of Kent W
Kent W
Flag of United States of America image

You don't need rsync on both. You are piping through ssh.  You would only need rsyncd (daemon) if you were running an rsync server.   The compression is actually in the data stream in between the servers.

You can add a space and "&" to the end to send it to the background. If you are calling a script via cron, I've never had to do that.  I only add & when I want to sent a CLI Rsync to the background.
Avatar of erzoolander
erzoolander

ASKER

So does my example command look decent to you then - just a plain :

rsync -avzhe ssh root@xxx.xxx.x.xxx:/var/www/ /localdestination/ &

(with an ampersand at the end?)

Will that copy everything from the www directory and place it in the /localdestination/ directory...or will it place a www directory inside of /localdestination/ as well?
ASKER CERTIFIED SOLUTION
Avatar of Kent W
Kent W
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Gracias