R – Placing a Sharepoint Site under version control

mosssharepointsvnversion control

Working with Mircosoft Office Sharepoint Server 2007 (standard edition) what is the best way to place a site collection being developed under version control? We're using Subversion for all our other (non-sharepoint) projects but I'm just not sure how to approach MOSS.

What needs to be placed under version control to ensure we have everything we need to rebuild the Sharepoint Environment?

Best Answer

Source control isn't just backup and source control isn't necessarily meant to be a backup solution. It's all about being able to do diffs of text files, collaborative development, branching and merging.

If the goal is disaster recovery, then get an empty server and start enumerating all the bits you had to use to rebuild the server and it's contents. Back up those bits, using differential backups, etc.

If the goal is to enable collaborative development, branching and merging, n-level undo for code artifacts, then carefully examine which code artifacts are binary and which are text. You won't get as much benefit from putting binary artifacts in subversion because you won't be able to merge or get diffs.

Also in the case of sharepoint, any modification you make to a website after you import the template will be difficult to version because those bits are stored in some hidden proprietary format inside the built in sql server. Not all of the components of your sharepoint solution are going to be on the filesystem where subversion really shines as a source control tool.