When you start planning for disaster recovery of your SharePoint farm you inevitably face the challenge of how to restore the farm configuration.

What is a configuration database? A configuration database in SharePoint is what defines your farm. It keeps all the information about other databases, servers and services that comprise the farm. It also stores info about “all Internet Information Services (IIS) Web sites or Web applications, solutions, Web Part packages, site templates, and Web application and farm settings specific to SharePoint technologies, such as default quota, blocked file types, and configuration” (from Database types and descriptions). If you want to drill into this in more detail, take a look at the database structure explained in Nidhi’s blog.

The coolest thing about configuration database in my opinion is how it serves as a central piece in WSS 3.0 architecture to allow administrators easily scale a SharePoint farm. All the global farm settings, most of IIS configuration (some details in Joel’s post here), and even solution binaries are stored in the config database and will be automatically propagated from there when you join more servers to the farm.

What’s the problem with backup/recovery of configuration database? Restoration of SharePoint configuration database is not supported by Microsoft if all you do is just take farm backup via Central Administration or with STSADM. In case of disaster recovery, you would have to manually re-create all farm settings, re-deploy any solutions and customizations, etc. A related article on TechNet gives a little insight on what causes this support limitation:

Although the configuration database and the SharePoint Central Administration Web site content database can be backed up, restoring backups of the configuration database and Central Administration content database from a farm by using the tools built in to SharePoint Products and Technologies is not supported.

This is because data in these databases may not be synchronized with data in other Microsoft Office SharePoint Server 2007 databases. Therefore, the tools built in to SharePoint Products and Technologies do not recover these databases during a farm-level recovery.

If this data is not synchronized, users might experience various random errors.

So, is there any way I can back up and restore the config database? We were discussing this with a well-known SQL expert Charley Hanania a while ago, and came to a simple thought – if something can be backed up, it must be possible to restore it. It’s the question of understanding the risks and choosing the right tools to mitigate them. If the risk is that SharePoint farm structure information in config database would be not synchronized with other databases, you need a way to make a point-in-time backup of all databases within the farm, ensuring that none of these databases changes during the backup process. How is this possible?

  • Obviously, snapshot technologies and products that use them can achieve this functionality. For example, this allows Microsoft Data Protection Manager to back up and restore all SharePoint databases, including configuration db.
  • Another supported way to restore all databases suggested on TechNet is to take a backup when the SharePoint farm is offline. Essentially, this means all SharePoint services are stopped across all front end and application servers, and no changes are being made during the backup process. Does not seem feasible for live SharePoint environment? This is where SQL Server’s features such as log shipping or database mirroring can help. Both techniques allow you to create and maintain a copy of SQL database that is not accessed by SharePoint. So working closely with your SQL DBA you can have a “point-in-time” copy of all the farm databases and back them up.

Config db is not the only reason why you can utilize log shipping and/or database mirroring in SharePoint environment. For example, see Mike Watson’s recent presentation decks from Best Practices and SPTech conferences, where he discusses how both options apply to SharePoint environment for high availability and disaster recovery.

Technorati tags:

2 Responses to “Mysterious config database: you can back it up but not restore?”

  1. David Says:

    Hi – Do I need to worry that I am not able to restore the SharePoint_Config DB on my new server?

    I can successfully move the content and AdminContent DB’s.

    Everything seems to be ok with SharePoint_Config?

    Thanks


  2. David,

    Do you mean you want to move all SharePoint databases to a new SQL Server? There is a procedure for this published at http://technet.microsoft.com/en-us/library/cc512723.aspx.

    Hope this helps.

    Thanks,
    Ilia


Leave a Reply