SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

Restore a production sharepoint web farm to a new web farm

 If you have a production WSS 3.0 sharepoint environment and need to copy the production data into a test environment web farm (different web farm), it can be done using SQL backups and restore.

I am more comfortable using this method than using stsadm tool. This could also be helpful when your production system crashes and you need to quickly get a backup sharepoint farm up and running with the latest production data.

Note: Make sure that you have a database maintenance plan, that backs up your production content databases nightly.

 Production sharepoint farm steps
 
 • In SQL Server Enterprise Manager, back up all Windows SharePoint Services 3.0 databases.
 
 
 Target farm steps ( if you are setting up a brand new WSS 3.0 farm)
 
1.  Install Windows SharePoint Services 3.0 on the target farm computer. Do not create a web application.
 
2.  In SQL Server Enterprise Manager, restore to the target farm computer, all Windows SharePoint Services 3.0 databases except the configuration database and the central administrator content database. Use the Restore Databases menu option.
 
3.  In the Windows SharePoint Services 3.0 central administrator console, create a web application for the portal site. If you have more web applications in the source farm, create the corresponding web applications in the target farm.
 
4.  In the Windows SharePoint Services 3.0 central administrator console, detach the content database from the newly created web application by doing the following:

5.  From the Application Management page click the Content Databases link under the SharePoint Web Application Management section.
 
6.  Change the web application from the drop down list.
 
7.  Select the content database.
 
8.  Select Offline for Database Status and check the remove content database
 
9.  Click OK.
  
10.  Attach the restored site Content database for the newly created web application.

11. On the Application Management page click Content Databases under SharePoint Web Application Management.
 
12.  Change the web application from the drop down list
 
13.  Click Add a content database.
 
14.  Enter the SQL Server name and the name of the restored database.
 
15.  Click OK.
  
16.  Start the search crawl from the Search Setting page.
 
17.  Click OK on the pop up dialog to resume the crawl.

You have now created a brand new web farm that is a copy of the production web farm.


Target farm steps (if WSS 3.0 farm is already Installed  and has web applications)
 

1. Make sure that you have same number of web application on this target server as the production server. You will need to use this web application for the restore of the production web application.
 
2.  Go to  Windows SharePoint Services 3.0 central administrator console, select the web application from the web application list.

3.  Select the content database.
 
4.  Select Offline for Database Status and check the remove content database
 
5.  Click OK.

6. Go to the SQL Server and delete the content database

7. Create an empty database on the SQL server and name it the same as the content database that you want to restore from the production web farm

8. Restore the backup taken from the production on this empty database.

9. Go back to Central Administration site
10 On the Application Management page click Content Databases under SharePoint Web Application Management.
11.  Change the web application from the drop down list
12.  Click Add a content database.
13.  Enter the SQL Server name and the name of the restored database.
14.  Click OK.
15.  Start the search crawl from the Search Setting page.
16.  Click OK on the pop up dialog to resume the crawl.

You should now have a copy of the production web farm in a test environment.


Posted 10-02-2007 4:41 PM by sam

Comments

EROL wrote re: Restore a production sharepoint web farm to a new web farm
on 10-03-2007 12:38 AM
Martijn Zoomers wrote re: Restore a production sharepoint web farm to a new web farm
on 10-03-2007 4:28 PM

In case needed, don't forget to copy the website's root folder, assemblies and changes to the 12 folder as well, or things might not work as expected.

Eric wrote re: Restore a production sharepoint web farm to a new web farm
on 10-19-2007 9:59 PM

Good information

giloulebreton wrote re: Restore a production sharepoint web farm to a new web farm
on 11-09-2007 8:29 AM

Thanks !

I also had to reinstall the specific feature:

with stsadm (-o installfeature and -o activatefeature)

Paul wrote re: Restore a production sharepoint web farm to a new web farm
on 01-22-2008 4:48 PM

In setting up the test environment, how closely matched in configuration (i.e. domain, user accounts, etc.) must it be to the production environment? Or is it sufficient that both have same version (e.g. SP1) of WSS 3.0?

sam wrote re: Restore a production sharepoint web farm to a new web farm
on 01-28-2008 1:42 PM

It is just sufficient to have the same version of wss 3.0. It does not even need to be on the same domain or user accounts as we are simply restoring databases and pointing the site collections to the new dbs.

Pradeepti wrote re: Restore a production sharepoint web farm to a new web farm
on 06-18-2008 11:37 PM

What is the exact process of moving the sharepoint database from one server to another.

How to configure the new database server to sharepoint?

Diego Martini wrote re: Restore a production sharepoint web farm to a new web farm
on 07-15-2008 8:16 PM

How about the workflow for each list,list views, custom forms, etc?

are they also included when we restore the data?

Thank you.

Manoj Kumar P wrote re: Restore a production sharepoint web farm to a new web farm
on 07-24-2008 5:42 AM

detaching attaching SQL is more comfort for me, but i have to know copying database is come with devoloped files like features  and definitions etc.,

Steven wrote re: Restore a production sharepoint web farm to a new web farm
on 10-02-2008 10:03 AM

Thanks for the concise article Sam.  I'd tried moving my my development site from one machine to another using both backup and stsadm tools and had two failures... (in preparation from moving our production server to a new machine and finally adding both a sql node as well as an index server).... but you're instructions worked like a charm.

Thanks again,

Steven

sodaif janani wrote re: Restore a production sharepoint web farm to a new web farm
on 10-21-2008 2:53 AM

Thanks alot sam.

our company site have been damaged and we haven't final backup. I use this article to restore our company site.

Best regards,

Sodaif

John B Johnson wrote re: Restore a production sharepoint web farm to a new web farm
on 11-25-2008 9:26 AM

This great for restoring from a full backup... how do I then restore from my differential?

Do I restore the full first, then try to restore the differential?

SS WU wrote re: Restore a production sharepoint web farm to a new web farm
on 04-03-2009 9:39 AM

You rock Sam.

I used these steps to move sharepoint to new server to decommission old server, worked like a charm!

Although I had to add content database using stsadm

faheem wrote re: Restore a production sharepoint web farm to a new web farm
on 04-18-2009 7:28 AM

Hi there, this is great - does this process apply to MOSS 2007 Farms where we have to deal with the SSP?

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.