Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / productivity / SharePoint / SharePoint2010

How to do SharePoint 2010 Content Deployment

4.00/5 (1 vote)
31 Oct 2011CPOL5 min read 21.2K  
This post will show you how to do SharePoint 2010 content deployment.

There are many articles on the web by describing Content Deployment in SharePoint 2010. But most of the time (in my case, it does not always work fine the first time :-( ), it does not working property and gives plenty of errors which direct us to restoring the backup rather than trying Content Deployment in the SharePoint Server.

Here, I'm going to my experiences and how I'm resolving those errors and a little bit of background about the SharePoint Content Deployment. Luckily, I have managed to successfully proceed with the SharePoint Content Deployment most of the time.

What is SharePoint Content Deployment?

Content deployment can be used to export (deploy) content from one site collection to another site collection. Content deployment takes care of the following contents in the source site collection.

  • Web pages – Deploy corresponding images styles, master pages, etc.
  • libraries
  • lists
  • resources

Content Deployment does not deploy

  • programs
  • assemblies
  • features
  • configuration information (Web.config)

Most of the time, Content Deployment fails due to features. In the latter, I will explain how to overcome these issues.

How to Configure SharePoint 2010 Content Deployment

We will use the following scenario for the deployment:

image

First, you need to create a site collection in the production server (Our One is production/sites/ALR) which you are going to use in the content deployment.

When you are creating, I'm always using site template as Select Template Later in the Custom Tab. You can use the blank template also but I'm recommending this one because this one worked for me all the time.

image

After that, you need to configure content deployment.

For that, go to Central Administrator –> General Application Settings–> Configure Content Deployment in the Production Server.

image

Go to this and

  • allow Accept incoming content deployment jobs in Accept Content Deployment Jobs section.

    image

  • Select Do not require encryption in connection security. (If you want, you can use https also, but for the moment, select the other one.)

    image

Then, go to Development Server and proceed with the following steps to configure deployment path and job.

First, we need to Configure Deployment Job. For that, go to Central Administrator of the development machine and then General Application Settings and then Configure content deployment paths and jobs.

image

Then, select New Job to create new content deployment job.

Then, specify Title and Description (Optional) and for the source application, select Source Web Application as Development and Source Site site collection as /sites/ALR (this is as per the scenario you can choose your one).

Then, you need to give production server Central Admin URL with the Port to Destination Central Administration Web Application. Here, I found that sometimes, we need to give the IP addresses. But, most of the time, URL will work.

image

Then, we need to provide authentication information. Here, most users are failing in this point (I was also) because whatever selection we made, we had to provide user name and password. Earlier, I thought if we select windows authentication, it does not need but it is not. Following shows sample values for Authentication Information.

image

After that, select the destination Web Application and Site collection in Destination web application and site collection section.

image

For the moment, leave Deploy User Names selected and Security Information All.

The SharePoint automatically creates a Quick Deployment Job for you.

image

For the moment, leave this and create a Deployment Job by right clicking the Deployment Configuration.

image

Here, you can schedule the content deployment but for the moment, select the following options, but of course you can change them as you want later.

SQL Snapshots --> Do not use SQL Snapshot
Scope --> Entire Site Collection

Then click and finish the job creation. Then you will see the following kind of a menu.

image

Now the hard part comes. In the Menu Click, Run Now or Test Job. (I’m recommending Test Job before actually running the Job. Because sometimes, Run Now deploys content partially and failed thus better to Test the Job before it is actually run.) Then, most of the time, you will get Test Failed. If not, you are very lucky, thus you can proceed with the Run Now. But if you get Test Failed (sure you are :-) ), following is the workaround you can use to fix those errors.

Following are the Most Common Errors You Are Getting

Could not find Feature someFeature

This error comes because this feature is not in the Production Server. Thus, install the feature to the production server and run the Test Job again, then it will say another feature is missing, thus keep on adding or removing unnecessary features in the development machine until it succeeds. You can find more feature details by using Powershell commands (click here).

Could not find Feature FT-01-bbb35132-7695-139b-2e18-27444285e766

These features are InfoPath Form Template Features. Thus, get the relevant Form template and upload it to the production server. Then run the Test Job and see the progress.

If everything finds most of the time, you are getting these kind of errors.

  • An unexpected error has occurred
  • A list, survey, discussion board, or document library with the specified title already exists in this Web site. Please choose another title.
  • Unable to import the folder _catalogs/fpdatasources. There is already an object with the Id d029169b-1f86-4275-bb99-dd78a48f7952 in the database from another site collection.

These errors come up because content database is having these objects and those are orphans in the site collection. Thus, you can repair the content database to delete these orphan objects in the particular site collection.

Thus, you can use the following Powershell command to get rid of these errors (click here).

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)