1

So, restoring the config database is not recommended, but what happens if you do it anyway? In theory, things could be out of sync, but in actuality, what exactly could get out of sync?

So, for example, at 10:00 pm, backup all SharePoint databases. 10 hours later, restore just the config database. In those 10 hours, no sites, web apps, or anything else were added/removed.

So now what happens?

Does the farm function normally?

Is there any way to use SharePoint tools to know that the config database has been restored?

3 Answers 3

1

As MSFT does not support the restore of Config DB. But if you took the proper measure before hand I mean put the farm in read only mode then using sql backup & restore you will be fine. One thing when you recover it, please clear the config cache.

But may i ask why you need to restore the config database as a test or real need?

Because if for some reason config db become out of sync then you see alot of orphan stuff in your farm. One example quoted on the KB article. "For example, a Windows SharePoint Services 3.0 content database may contain data about a newer site. If the configuration database does not contain information about this site, the site is orphaned. "

Read this blog to understand what is stored in config db:

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”

http://alliknw.blogspot.com/2009/02/sql-databases-created-by-sharepoint.html

http://iliasotnikov.wordpress.com/2009/03/20/mysterious-config-database-you-can-back-it-up-but-not-restore/

2
  • So, the config database in my farm was restored. Let's not worry about how that happened ;) I understand about orphaned site collections and such, but the restore took the config database back a few hours, during which time no users were on the system (though the farm was online, so timer jobs were still running). So, is there a way to test if all is ok? Do I need to build a new farm and restore content dbs into the new farm? What now?
    – Mike2500
    Commented Oct 1, 2014 at 20:12
  • Look this article about searching orphans in content DB link Commented Oct 1, 2014 at 20:31
0

We do it all the time to sync our environments. You just have to plan for an outage or put it in a Read-Only state. SQL Management studio can be used to Backup / Restore the Content DB. So can Powershell:

http://technet.microsoft.com/en-us/library/ff628582(v=office.15).aspx

After a restore the DB, the farm acts as it should, yes. Use Central Admin to ensure the Content DB is attached to your Site Collection.

If you are trying to sync to farms (which makes more sense to me) This is the process I take to Sync Content DBs:

  • In SQL Management Studio, take a Backup of WSS_Content from Dev SQL Instance (overwrite all existing backup sets)
  • Copy .bak file over to UAT SQL Box
  • Go to UAT Central Admin and Remove the Content Database from the main application
  • Now we can Delete WSS_Content from UAT SQL Instance (Click 'Close existing connections')
  • Restore the Copied .bak file from disk (Ensure you "Overwrite existing database")
  • Go back to Central Admin in UAT and Attach the Restored Content Database (WSS_Content)
  • Do an IISRESET
  • Restart the SharePoint Timer
1
  • Thanks, but I'm asking about the config database, not content databases. And, I'm asking about a scenario that was not planned for in advance, so the farm was online, the databases were backed up using SQL tools (again, while the farm was online), and then later the config database is restored.
    – Mike2500
    Commented Oct 1, 2014 at 19:20
0

Actualy microsoft does not support the restoration of the configuration database by using the built-in backup and restore functionality.

From the other side the configuration database contains data about the following:

  • SharePoint databases
  • Internet Information Services (IIS) web sites
  • Web applications
  • Trusted solutions
  • Web Part packages
  • Site templates
  • Web applications

And if have not created new web applications or installed solutions then the configuration database can be successfully backed up and restored by using SQL Server or other tools if the SharePoint farm is first taken offline. More information here: http://technet.microsoft.com/en-us/library/cc678868(v=office.15).aspx

1
  • Thanks, but please see my comment to waqas. I understand that it shouldn't be done, but what if it has been done?
    – Mike2500
    Commented Oct 1, 2014 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.