We need to keep a set of files on multiple servers synchronized. This seems like a simple problem, but I'm not a full-time system administrator, and while I've found a simple solution, it's not very robust.
We have an application that we serve to our enterprise via Citrix on Windows Server 2003 machines (these boxes are about to be virtualized). Originally, when the app had a new version release, we'd manually copy the files to each server. I reduced the footprint of this manual effort via a batch file. It works, but what I'd think is even better is to copy the updated files to just one location and have a tool take care of the rest.
Is there some other tool that can easily do the synchronization or is my best bet to stick with what I have or perhaps look into the more advanced features of Robocopy?
We are using SyncBack, which has lots of good features in all versions: free, SE and PRO version: synchronization or backup over network shares or FTP, ZIP, filters, HTML and email logs, scheduling etc.
We use both commercial and free versions on ours servers for web application deployment/synchronization, log file transfers and backup-to-disk jobs.
Assuming you're running R2 of Windows 2003 Server or newer, you've got DFS Replication right out of the box. It's designed for exactly the situation you describe. All files in a particular folder are automatically synchronized between each member in the replication group. It happens automatically as soon as any changes are detected on any member and only sends the changed bits of files over the network.
Don't let the seemingly complication documentation scare you. It's pretty simple to get setup assuming you've already got an Active Directory.
If you just want simple folder synchronization, I'd just use a script like:
This will add and delete files from %DESTINATION% so that it matches the %SOURCE%. If you'd like something a little nicer to look at, try RichCopy, the successor to the Robocopy GUI
Rsync is a great option however not very windows friendly. ViceVersa might work and supports volume shadow copy for locked files.
It does seem like you are trying to manually push the data out to other machines running applications so you would need to shut down the applications before replacing their files? If this is the case, you will need to either script from the hosts to poll an update server, or have your script remotely login and call an update script.
I've just set up file synchronization between a Windows 2000 Server and a Windows 2003 Server using cwrsync, a windows compile of rsync. It was easy to setup and seems to work welll but I am seeing a problem with speed, the client does not seem to be able to top 130 Kb/s despite the network being capable of delivering 1 Mb/s over FTP. Anyone else experienced this and found a solution?
Another good tool is Always Sync. Supports n-way synchronisation, continuous synchronisation, optionally moves deleted files into a separate folder, works with USB devices etc etc etc.
Robocopy
Robocopy (Robust File Copy) can handle some basic synchronization using the /MIR flag.
You'll find Robocopy is built into Vista and later operating systems.