Thursday, March 24, 2011

How to Deploy a SharePoint site from one server to another?

Some times we need to deploy our share point Site on Staging server for client access to test the website.


Follow the below steps to  migrate Sharepoint site from Dev Server to Staging.

Method I


1. Use SQL Management Studio to backup the Content Database
How to: Back Up a Database (SQL Server Management Studio):
http://msdn.microsoft.com/en-us/library/ms187510.aspx

2. Restore the Content Database to your new SQL server
How to: Restore a Database Backup (SQL Server Management Studio):
http://msdn.microsoft.com/en-us/library/ms177429.aspx

3. Create a new web application in Central Admin on the new farm:
Create a Web application (SharePoint Foundation 2010):
http://technet.microsoft.com/en-us/library/cc288705.aspx
 
4. Delete the content Database that get's created by the new web application(from step 4)
Central Admin > Application Management > Content Databases > delete the empty db from your web application (created in step 3)

5. Use SharePoint Management Shell(Mount-SPContentDatabase), Stsadm(-o addcontentdb) or Central Admin to add the contentdatabase:
Add a content database (SharePoint Server 2010):
http://technet.microsoft.com/en-us/library/cc825314.aspx
 
6. Make sure that your account has administrative permissions on the site collection(update site collection administrator)
 
Add or remove site collection administrators (SharePoint Server 2010):
 
 Method II

We can use Central Adminstration to take back up of a farm or site collection to a shared location and we can restore the backup file into a new server farm using the new server farm's Central Administration as shown in the below images.