A Warning
This article is going to be a disappointment to most of you who are hoping I have stumbled onto the Holy Grail of farm syncing. This is an explanation of why it can't be done without consuming an extraordinary amount of effort, time and resources.
The Challenge
How many of you have heard this statement before:Build me two identical SharePoint farms
Until recently, I was unable to effectively explain to SharePoint and Non-SharePoint people why a SharePoint UAT farm and a SharePoint production farm couldn't always be exactly alike. The expectation is I am going to give them a way to keep them perfectly in sync.
Where the frustration begins
In my experience, most SharePoint farms are not managed by a full time SharePoint person but instead are run by a single part time person. The IT department is stretched a little too thin, they are working long hours and budgets just can't justify a dedicated resource. The team really just wants something easy to work with so they can see their family on weekends and syncing their Prod and UAT SharePoint farm isn't their highest priority. The solution I hear most often is "Can't I just clone all the servers?" You should all know by now the answer of course is no, no you can't. Cloning servers seems to always be the go to answer because so many other applications can be built with an identical footprint and then cloned to keep them in sync. Modern cloning tools are savvy enough to update the inner working of many of the applications we use and to make sure nothing causes a conflict. I think the last time we were able to clone a SharePoint environment with a high level of success was way back in 2003. After the clone, you still had to run a bunch of stsadm commands to make it work right.The Explanation Part
I was always bothered by the fact that I could never explain without going into super technical detail why cloning was just not going to work. A point of pride in me is being able to come up with an analogy to help explain the problem in a way that makes sense to everyone.Like when Doc Brown slipped on his toilet and came up with the Flux Capacitor, my moment came with much less excitement while driving home and sitting in traffic.
The Good Part, the Analogy
While I was on my drive home, thinking about my Nissan with 250,000 miles on it, I was pondering why some cars last so long and others die young and that's when it hit me.When you start off setting up a SharePoint farm and you use a script like Autospinstaller, you are as close a possible to creating two identical farms. It's just like 2 Nissan's rolling off the same assembly line. Each car is as close a possible to being identical. In SharePoint, each farm has that nice new site collection smell and when you log into Central Admin and the SharePoint error bar is actually green, it's indeed a fantastic, satisfying day!
Unfortunately that's where things end. Just like those brand new Nissan cars, each SharePoint farm will have a totally different life. If cars are expected to live by the same, perfect, exact match rules that IT enforces, people will laugh. Think about how that might work, you are expecting each Nissan to be identical for its entire life and to be identical the day it's retired. I doubt any person would expect that to happen.
Every person knows that cars start off the same but as they get driven, accessories are installed, accessories are removed and you drive them differently. They end up being very different after a while, especially when you crash one. Cars and SharePoint are almost never right again after a crash.
Conclusion
Here are a few tips to help you out- Do not experiment in your UAT and Prod farms. Only test out 3rd party and custom packages in a development environment.
- Do not look at content as an item to keep in sync. It's bad form to have all the content from Prod sitting around in UAT.
- Do use a tool like Autospinstaller and SPDocit to document your farm configuration. There are always add ins and packages that are often forgotten.
- Do set the expectation that two farms will never be identical!
Hopefully this helps set a proper expectation with your SharePoint farm syncing adventures.