Synchronzing file the easy the easy way using RSYNC

One of my tasks was to replicate our build servers around the world (SC, ATL, TLV, etc) although this sound like an easy task - it is not because we have several build machines (more than 7) and maintaining them is a long lasting task not talking about the initial setup needed.
So i have decided to copy the build output to each location every day, this was not a good solution because size of the build is approx 15 giga and moving this in the wan is very very slow!
so after hearing about RSync i decided to give it a try it, and it worked amazing, saving bandwidth to approx 1.3 giga only (because it transfer only the delta)

The mechanism that i have set up is using a dedicate folder called "StagingArea" that is the target of the build (e.g. the build created every time is on this folder), the reason i used one folder is because i want to sync that older from source to targets (than it can use the delta mechanism in RSync)

After the sync is over (few min), the target machine is copying the StagingArea to a new name that is the new build number (e.g. 11.0.0.XXXX) and that way we have replicated build infrastructure that is control from one location and is synchronizing the output folder in an optimized way (very low maintenance)

The command line i use to replicate is rsync -avz "stagingarea/" "targetserver::modulename"
Using the z argument means that you also compress the delta - but be aware this is CPU consuming task (so give it a try before you go live)

you can download cwRSYNC
Synchronzing file the easy the easy way using RSYNC Synchronzing file the easy the easy way using RSYNC Reviewed by Ran Davidovitz on 5:02 AM Rating: 5

3 comments:

Anonymous said...

you loose all your file securities no? All the ACLs are removed!

Anonymous said...

you loose all of your folder securities/acl's no? Wanted to do the same but found it wasn't feasible. Now trying to rsync vhd's

Ran Davidovitz said...

I set the NOACL in the fstab so its mean it doesn't set ACL --> inherit from parent + set read only attribute.

To use ACL i can say it is pretty advance and require you to set the users files specifically in correct way (i didn't do it because i didn't have time for it)

Powered by Blogger.