SharePoint By Yagya Shree

SharePoint: How to replicate SharePoint production server in a test environment

leave a comment »

We need to check first the current configuration of the Windows Server on which SharePoint is running i.e.

Current service pack installed
Encryption of the server
Current build of the server
Current .NET Frameworks installed on the server

We have to create a same Windows Server on the test environment where we are going to install and restore the production server
The best and fastest way that I find is content DB attach and detach mode. Usually you will not have any change in the Search / SSP DB and User Profiles in test. Hence no point moving them, however, if you do have any changes to profile / search config you have to move the SSP and Search DB as well.
Here is how you do it (Before doing anything take a full backup from Central Admin on production server):
Refer:
Back up a farm by using Central Administration (Office SharePoint Server 2007)
http://technet.microsoft.com/en-us/library/cc262946.aspx

Now after that we should take backup of config database, content database and Search databases as per the below article:
Refer:
Back up a farm by using SQL Server tools (Office SharePoint Server 2007)
http://technet.microsoft.com/en-us/library/cc263069.aspx

Now Go to “C:\InetPub” in your production server and take back of the entire folder
Afterwards go to Central administration–Operations–Solution Management  (http://<central_admin_url>/_admin/Solutions.aspx) and note down all the solutions deployed in the current farm configuration
Then go to Central administraion–Operations–Alternate Access Mappings (http://<central_admin_url>/_admin/AlternateUrlCollections.aspx ) and note down all the site url present in here

Now go to the test server where you have freshly installed the Windows Server. The server should be joined to a domain and you should be logged in to the server using one of the domain account, who should be local administrator on the server
Install IIS 6 on the server from control panel—add & remove programs
Install following asp.net programs:
.NET Frameworks 2.0
.NET Frameworks 3.0
Install SQL 2005 on the server
Download and install SQL Server Management Studio
Refer:
Microsoft SQL Server Management Studio Express
http://www.microsoft.com/downloadS/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en
Bring all the backup databases from production to the test server

Open SQL Server Management Studio and restore all the databases in the server

Refer:
Restore a farm by using SQL Server tools (Office SharePoint Server 2007)
http://technet.microsoft.com/en-us/library/cc262197.aspx
Install MOSS 2007 with Advanced—Complete

Refer:
Install Office SharePoint Server 2007 and run the SharePoint Products and Technologies configuration wizard
http://technet.microsoft.com/en-us/library/cc262079.aspx
Now you should create new web application in the Central administraion—Application managment—create or extend web application—create a new web application (http://<central_admin_url>/_admin/extendvs.aspx )

Refer:
Create or extend Web applications (Windows SharePoint Services)
http://technet.microsoft.com/en-us/library/cc287954.aspx
Now run the following commands under command prompt after going to following directory
C:\Program Files\Common Files\Microsoft Shared\Web Server Extension\12\bin
Stsadm -o addcontentdb -url <http://newly_creted_web_appliaction_name:port> -databasename <restored_ContentDBName> -databaseserver <NewSQLServerName>
Refer:
Addcontentdb: Stsadm operation (Office SharePoint Server)
http://technet.microsoft.com/en-us/library/cc263422.aspx
You should follow the above two steps for each content database you have restore in your Test box’s SQL server
You have custom webpart or site definitions that you have deployed in the Production box you have re-deploy them in the Test box in the _Layouts and the GAC or BIN as the case may be.
Configure SharedServcies in you Test box by following below article

Refer:
Configure the primary Shared Services Provider
http://technet.microsoft.com/en-us/library/cc262649.aspx
After following above steps you should able to replicate your production box to a test box without any issues.

Written by Yagyashree

June 27, 2009 at 7:11 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: