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 /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.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent WSr. Network / Systems AdminCommented:
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.
erzoolanderAuthor Commented:
So does my example command look decent to you then - just a plain :

rsync -avzhe ssh /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?
Kent WSr. Network / Systems AdminCommented:
IF you have rsa keys between the machines this will work.  Otherwise you will be prompted for a user / pass, in which case obviously sending to the background won't work.

If you have rsa keys between them, then yes, that will do what you are expecting.  

You have a trailing slash on both locations, so the contents of /var/www/ will be mirrored to /localdestination/ just as you are expecting.
If you did not have a trailing slash, it would create www under /localdestination

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
erzoolanderAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.