Skip to main content

Copying SharePoint 2010 Site Collection from Production into DTS environment via Database back up and restore

 

If you are running SharePoint farms then you would have come across this requirement at least once, which is to replicate a production site or site collection into Development, Test or Staging environment. There are a number of blog posts and articles on how to copy down the site or site collection without much trouble but I have not found one which worked as expected.

The Database back-up and restore method is a quick and easy method or cheaper solution than commercial tools available in the market. This method works well if you would like to quickly copy content. With the content database attach method the key is to be aware that the following items which are farm related attributes, need attention as they are not copied across. Search scope and Indexes, User accounts and Managed Metadata. 

There are easier ways to overcome these. Search scope and indexes have to be redone and it does not take too much of your time. If your DTS environments have different users than the production environment then you may want to recreate the users, assuming you don’t need all production users in your DTS. Managed metadata and term sets can be restored from production if it’s a requirement. I am not going to go into the details of it in this post.

1. My site collection from the source farm looks like the following

image

 

2. My content Database is called WSS_Content_bd_074

 image

3. Take a back-up of the content database using the tool you are familiar with. I am going to take the quick and easy way and use SQL Management Studio. Right click on the db and select ‘Task’—> ‘Backup’. Take a full backup and move it to your destination SQL server or mapped drive.

4. Restore the database into your destination database server. Right click on Databases node and select Restore Database ‘Databases’—>’Restore Database’. Select the back up file after selecting Device option. My screen looks like this.

image

5.Click Ok to restore the database. At this point I have the content Database ready to be attached to the Site Collection in my destination environment.

image

 

6. Create a blank site collection. If the site collection in your source environment was deployed through a solution, you should use the same solution to create the blank site. In this example I have manually created an empty site collection and added a blank team site called ‘My Test Team Site’.

image

 

7. Now go to Central Administration page for your Farm and click on Manage Content database

image

8. Select the appropriate web application and click on the content database. My content database is WSS_Content_myteamsite

image

9. From the next page select Remove content database and ignore the message. Click on ok to detach the content database from your site collection.

image

 

10. At this point you have a blank site collection without a content database

image

 

11. Now attach the database we restored from the source environment. Click on ‘Add a content database’. Only change you have to make is to change the Database name.

image

 

12. I will just type in ‘WSS_Content_bd_074’ and hit OK to attach the content database. Once the this is complete your manage content database screen will look like the following.

image

 

If you now go to your new site. In my case it is http://mysite  will see the bd-074 site

 

image

If you have errors at this stage, you might want to look at the configuration database version and make sure that both farms are patched up to the same level.

One of the common errors has been discussed here. http://sharepoint.stackexchange.com/questions/40523/mount-spcontentdatabase-error

Discussion on how to achieve the same result through PowerShell has been is here http://www.sharepointassist.com/2009/05/30/restoring-a-sharepoint-site-collection-to-a-new-domai/

Comments

  1. Hi,
    It is very informative and very helpful on my research regarding seo techniques. Thanks for sharing this post.
    Authentication Services

    ReplyDelete

Post a Comment

Popular posts from this blog

Microsoft Dynamics XRM proxies–Early bind in ASP.NET web service

  As a hands on Development Manager I often get to lead by example, in my latest attempt to fast track re-development of some of our Java based web services to ASP.NET web service, I went about this using XRM based early bind method. I also explored SDK and JavaScript to execute the Dynamics rest API. For a starter our web service methods roll up large datasets therefore JSON based service was obviously not suitable. Also the java based services made calls to multiple stored procedures through Hibernate frame work, the idea was to convert any calls to Dynamics CRM using XRM with LINQ and other bits and pieces using NHibernate framework. I am keen to learn alternative methods and very open for feedback on the approach I have taken here. Without further ado here are the steps.   1. Re-Compile XRM to include proxies for Dynamics CRM customisations. This was easily done by executing the following commands within the CrmSvcUtil.cmd file REM $0\..\..\Microsoft.Xrm\bin\CrmSvcUtil /code

External Authentication providers for SharePoint 2010–(Oracle/Sun Directory as user stores)

External Authentication providers for SharePoint 2010: Thank you for continuing to read my blogs. It is a Sunday afternoon and the Roosters are leading Panthers 10 points to 6 in NRL, by the look of it, it has all the signs of turning into a one sided match in the second half. I thought I might write a blog about SharePoint and Single Sign On with Non-Microsoft Technologies. The Problem: Often Organisations would like to utilise their existing stack of technologies with SharePoint. This is due to the popularity of SharePoint as a platform to consolidate and provide a range of application services either to replace an existing set of tools or compliment an existing applications suite. We fall under the latter. I am working within a truly heterogeneous environment at the moment, the extranet applications are built on a mix of technologies such as OpenText Livelink for DMS, Java and JBPM for for workflow and front end portals, Sun Directory and Oracle for User data and other DB La

Downloading files via HTTP to Android flash disk instead of relying on the browser, for better user experience

  Scenario: When the user hits a list item within the Android ListView control we would like to open a document in this case its a .pdf document from one of our web sites. The website expects a parameter and serves a pdf, matching the parameter in the request. When a file is not available we get a standard 404. There are times when you just cannot rely on the browser available on Android handsets to open documents for various reasons, one being you want to pop specific error messages on the screen ie document ‘NAME’ is not available yet and some reasons. Our users did not like the passing the control to the browser from the Android application and then reopen the application to get back to where you were.   Solution Discussion One of the possible solution is to stream the file and write it to and disk and create an activity to open the file on a pdf reader application. PDF readers are shipped with Android which made our lives a lot easier. The small minority who did not have the