Thursday 9 February 2012

Restoring sharepoint site from content db backup - Sharepoint 2010

If web application doesn't exist on on your target server then create one.

Restore the content database backup (full database backup) on your WSS_Content on target server.

DETATCH ANY CONTENT DATABASES FROM THE TARGET WEB APPLICATION IN Central Administration

Application Management, select “Manage Content Databases” under the Database heading.

Select the target web application in the “Web Application” drop-down box at the top left, if it is not already selected.

Picture

Ensure there are no content databases for the target web application. If the list contains any content databases, click on each content database name. On the “Manage Content Database Settings” screen, select the “remove content database” checkbox and click OK.
Picture
Note: Make sure to log into your SharePoint 2010 SQL Server Instance at your convenience and delete any orphaned content databases that were removed from the web application in the step above.

ADD CONTENTDB THE CONTENT DATABASE USING STSADM.EXE

Using the stsadm.exe tool, run the addcontentdb command using the syntax below:

stsadm –o addcontentdb –url [URL] –databasename [DBName]
Picture
Once executed, the command window will update with a progress indicator as seen in the screenshot above. Once it is complete, you will either receive one of two messages:

Operation Completed Successfully


1 comment: