Home

Friday, October 19, 2007

SharePoint V3: Recover Site Collection from SQL DB Backup

Here are the steps to follow if you need to recover a deleted site collection from a SQL database backup. For purposes of covering various scenarios, I tried to outline related IIS and AAM configurations to be aware of during the process.

* SharePoint Central Administration > Operations > Backup and Restore
Perform a full farm backup

* SharePoint Central Administration > Application Management > Create or Extend Web Application

* Create a new Web Application
It doesn't matter what you name this database, it will be deleted in a later step

* SharePoint Central Administration > Application Management > Content Databases
You will see that the number of sites is 0 because there are no site collections associated with this web application yet

* SQL Management Studio

* Locate the content database backup which contains the site collection you would like to restore

* Restore this content database, overwriting the one you created for your new web application
Here is where you want to be concious of the name you give the restored database. I like to name the first content database for a web application WSS_WebApp_WebAppName and subsequent content databases for the web application as WSS_SiteCollection_SiteCollectionName.

* Attach the restored content database to the new web application
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> Stsadm.exe –o addcontentdb –url http://servername –databasename databasename –databaseserver servername

* SharePoint Central Administration > Application Management > Content Databases
You will now see the content database you restored. The number of sites should be 1 if there was originally 1 site collection in that database when it was backed up.

* Navigate to the URL of the new web application. Verify that the site collection was restored and is
functioning properly

* IIS Management
Note all IIS settings for the original web application including host headers and ip addresses of the IIS web site

* SharePoint Central Administration > Operations > Alternate Access Mappings
Note all of the AAM's for the original web application

* SharePoint Central Administration > Application Management > Delete Web Application
Delete the original web application

* SharePoint Central Administration > Operations > Alternate Access Mappings
Add all of the necessary AAM's to the new web application, make sure the default AAM is fully qualified

* IIS Management
Update the IIS web site for the new web application with all necessary host headers. If the original web application had its own unique, internal ip address asssigned to it, then assign that ip address to the new web application

* Test the URLs for the restored site collection

No comments:

Blog Archive

Followers