Share via


SharePoint 2010: Content Deployment

There are many articles in the web by describing Content Deployment in SharePoint 2010. It is not working properly and giving 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 little bit of background about the  SharePoint Content Deployment. Luckily  have manage to successfully proceed with the SharePoint Content Deployment most of the time.

What is SharePoint Content Deployment 

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

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

Content Deployment do not deploy

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

Most of the time Content Deployment fails due to features. I will explain how to over come these issues in the later part.

How to Configure SharePoint 2010 Content Deployment

We will use following scenario for the deployment

http://lh5.ggpht.com/-lrdN_I1GCIA/TqUIIIrDj5I/AAAAAAAAAn0/E9DnB9FEDeA/image_thumb1.png?imgmax=800

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 times. [You CANNOT use the blank template!]

http://lh4.ggpht.com/-f_NJOZrpngA/TqUIKZYdRUI/AAAAAAAAAoE/QKv4ZczS370/image_thumb5%25255B1%25255D.png?imgmax=800

After that you need to configure content deployment

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

http://lh4.ggpht.com/-jQrEq3K6DLI/TqUIMwm3edI/AAAAAAAAAoU/fEqvVobo0tg/image_thumb3.png?imgmax=800

Go to this and 

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

 http://lh4.ggpht.com/-LuPKvDeqg3U/TqUIPqbgNdI/AAAAAAAAAok/XEUbilW8KlA/image_thumb5.png?imgmax=800

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

http://lh6.ggpht.com/-_U4AV8Vh2r0/TqUIR7P1PPI/AAAAAAAAAo0/iAc8Ajxc4HE/image_thumb8.png?imgmax=800

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

First we need to Configure Deployment Job. For that Go to Central Administrator of the developmentmachine and then General Application Settings and  then Configure content deployment paths and jobs.

http://lh6.ggpht.com/-c0uSJHag8C0/TqUIU9_RziI/AAAAAAAAApE/m4RxAi3IPjk/image_thumb10%25255B1%25255D.png?imgmax=800

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 some times we need to give the with IP addresses. But most of the time URL will work.

http://lh6.ggpht.com/-o7-wqaqCLw0/TqUIW30BtwI/AAAAAAAAApU/ijE1h5nBNC0/image_thumb1%25255B1%25255D.png?imgmax=800

Then we need to provide authentication information. here most users are failing in this point (I were also). because what ever the selection we made we have to provide user name and password. Earlier I thought we can select windows authentication but it is not needed. Following shows sample values for Authentication Information.

http://lh5.ggpht.com/-qEUzVd0iZF4/TqUIZfPuXpI/AAAAAAAAApk/RADxsfqO-h0/image_thumb3%25255B1%25255D.png?imgmax=800

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

http://lh5.ggpht.com/-1GjerotpVTY/TqUIb9H4Y_I/AAAAAAAAAp0/-jOrX5591Fc/image_thumb6.png?imgmax=800

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

The SharePoint automatically create a quick Deployment Job for you.

http://lh3.ggpht.com/-RNYJltpD-Ww/TqUId0GyTjI/AAAAAAAAAqE/wDUuNlf08Hs/image_thumb8%25255B1%25255D.png?imgmax=800  

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

http://lh3.ggpht.com/-_1ZzFi800BY/TqUIf3kSnvI/AAAAAAAAAqU/UYZnp-O2SHM/image_thumb10.png?imgmax=800

Here you can schedule the content deployment but for the movement select following options but of cause you can change them as you want later.

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

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

http://lh6.ggpht.com/-WXDkOQFqOJ4/TqUIhWwnLBI/AAAAAAAAAqg/2E3bhoG7c3Q/image_thumb12.png?imgmax=800

Now the hard part comes. In the menu Click Run Now or Test Job. (I’m recommending Test Job before actually run the Job. Because some times Run Now deploy 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 are the workaround you can fixed those errors.

Following are the most common errors you are getting:

Could not find Feature someFeature.

This error coming 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 get succeed. You can find more feature details by using  power shell 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.  The run the Test Job and see the progress.

If every thing 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 are coming because content database is having these objects and those are orphan 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 following power shell command to get rid of these errors (click here).