Deep Dive into the SharePoint Content Deployment and Migration API – Part 6

[Part 1Part 2Part 3Part 4Part 5Part 6 – Part 7]

Requirements for a successful content deployment

Be aware that this article cannot provide a complete list of all requirements. I will update it from time to time if required. Today I will list all the requirements I have seen in the past which – when missed – can cause content deployment jobs to fail.
 

1) The servers configured as export and import server need to host an instance of the Central Administration website

When configuring the “Content Deployment Settings” for your farm you have the chance to select different servers in your farm to work as export and import servers for the content deployment. This allows to offload this task to a dedictated server to reduce the load on your web frontend servers.

The comments of this configuration options look as follows (here shown for the Import server):

Import Server
Specify the server you want to receive incoming content deployment jobs. This server must have enough available disk space to store the incoming jobs, and it must be running an administration Web application for the farm.

So this requirement is actually listed but a little bit hidden in the second half of a sentence.

In case you configure a server that does not host the Central Admin website then you will not get a warning here!

Impact: The effect you will see is that the content deployment export or import phase will not start.

How to resolve:
1) Provision the Central Administration website on the desired server
2) Change the configuration of the export and/or import server
 

2) Ensure that sufficient disk space is available

This sounds like a simple prerequesit but it isn’t. Content deployment uses different places to store the extracted and compressed files. The compressed files are stored in the location you can configure on the “Content Deployment Settings” page in the “Temporary Files” row.

But before export creates the compressed files it first exports everything into a temporary directory. And this directory is placed inside the directory which is configured in the TMP environment variable of the user the Windows SharePoint Services Timer service (OWSTIMER.EXE) runs on (usually refered to as farm credentials). Per default this variable has the following value: “%USERPROFILE%\Local Settings\Temp” which is usually on your system drive.

Impact: So per default MOSS content deployment requires the disk space for the uncompressed exported files on your system drive!

How to resolve: The easiest way to resolve this is to logon to the machine with the farm credentials and adjust the TMP variable to point to a different location. Afterwards you would need to restart the OWSTIMER service.
 

3) Use an empty site collection as the destination of your content deployment job

As already discussed in Part 5 content deployment will fail if the destination database contains conflicting content. To avoid this it is required that the initial deployment is done into an empty site collection.

Be aware that the only way to create an empty site collection is to use the following STSADM command:

STSADM.EXE -o createsite -url <url-to-site-collection> -ownerlogin domain\user -owneremail <email-address>

Using the “Blank Site” template will NOT create an empty site collection! It will actually create a site collection with content. You can see the difference if you create a site collection using both methods and then inspect the content of the created sites using SharePoint designer.

I personally recommed to always use the STSADM command with the syntax above to ensure that you really have an empty site collection as destination.

Impact: If the site collection has been created using a different method or already contains data the content deployment job will fail.

How to resolve: Deploy into an empty site collection
  

4) Install all required features for your site on the destination server

If your site requires custom features ensure that the features are installed on the destination server before running content deployment.

Impact: If the are missing the import phase will fail.

How to identify this: I have written the tool WssAnalyzeFeatures which allows you to identify such problems.

How to resolve: Copy the features to the destination server and install them using STSADM -o installfeature. 

5) Do not activate custom features for your site collection on the destination server manually

You should not activate custom features on the destination server if this activation creates content in the destination database as this can cause conflicts as outlined in “Problem 1” of Part 5 of this article series. Instead you should run content deployment and let the import process activate the features on your destination server as this will ensure that all items get created using the same ids as on the source server which is otherwise not guaranteed.

Impact: If the features have been activated and the content deployment import can fail with similar error messages in as “Problem 1” of Part 5.

How to resolve: Deactivate the feature in the destination site and ensure that all items created by the feature are removed. Alternatively do a full deployment into an empty site collection instead.
 

6) Do not expect that incremental deployment will deactivate features in the destination server site collection

The content deployment and migration API was not designed to deactivate features on the destination server. If a feature needs to be deactivated on the destination server you need to manually perform this deactivation.

7) Ensure that all feature definitions of features activated on the site collection exist on the source server

This is actually a high call generated for Microsoft Support Services: in the development a feature becomes obsolete and is removed or replaced with a different version with a different Guid but on some sites or site collection the old feature is still activated.

Impact: The affected sites can no longer be exported. You will get the errors listed in this article.

How to identify this: I have written the tool WssAnalyzeFeatures which allows you to identify such problems.

How to resolve: Either copy the missing feature files to the required location or uninstall the feature using STSADM -o deactivatefeature/uninstallfeature. In case that STSADM -o deactivatefeature fails to deactivate the feature you can use my tool WssRemoveFeatureFromSite.
 

8) Configure the retention period of the change log to be long enough for incremental deployment

See here for details.
 

9) Ensure that content deployment jobs do not run in parallel

The current implementation of the content deployment and migration API does not allow parallel execution. There are plans to change this behavior in the near future but as is you need to ensure that only one deployment is running at a time.

So if you have multiple deployment paths and jobs for the same site collection you need to ensure to schedule them in a way that they don’t overlap.

But this is not the only place to look at! Sometimes it is nearly impossible to prevent parallel execution. Just think that the content deployment and migration API is not only used to deploy content between different webfarms. The same API is used in the copy/move implementation inside site manager and in the variation feature.

With other words: you can experience problems with content deployment if an author copies a page at the same time or creates a new page in the source variation label which is then replicated to the destination. And also vice versa a copy operation can fail because a quick deploy job was running at the same time.

Impact: parallel execution of deployment jobs can lead to failing content deployment.

How to resolve: you need to restart the failed deployment job

10) Ensure that the patch level on source and destination farm is identical

Content deployment is only supported if the WSS and MOSS patch level is identical on source and destination. Some hotfixes have changed the schema of the export packages slightly which can cause deployments between different patch levels to fail.

Impact: content deployment and STSADM -o export/import can fail if the patch level is not identical

How to resolve: ensure that both farms are on the same WSS and MOSS patch level

11) Required Language Packs need to be available

Language Packs used in the source site collection have to be installed on the target farm as well. 

Impact: if a required language is missing content deployment will fail

How to resolve: install the required language packs on the target farm

12) Avoid the problems listed in Part 5 of this article series.

62 Comments


  1. Thanks for posting this.  I was about to write up something similar but now it will be easier to just point to your blog.

    A few additional items that I would consider adding are:

    1.  Be careful about the frequency of deployment jobs.  Content deployment has a severe impact of performance if your site heavily uses cross list queries, CQWP, or the object cache.  Deployment wipes clean the object cache.

    2.  Be careful about how many jobs you run not just their frequency.  for the same reason as number 1. Sometimes its necessary break down deployment into smaller jobs to get initial deployment.

    3.  Write a script to change the default timeout for transport/import to a larger number.  Default is 10 seconds and on a slow netwrok it will kill deployment.

    4.  Be careful about full deployments.  Your database size will grow with each full deployment.

    5.  Evaluate whether you want versions turned off at the destination.  If so write a script to turn it off.  Full deployment will turn it on and grow the database again.  So be careful.

    I am sure I will think up of a few more :-).  

    Thanks for this series of articles.  They have been very useful.

    Ranjan

    Reply

  2. Hi Ranjan,

    that is great input!

    Maybe you could post the important pieces of the scripts you mentioned as well?

    And keep your input coming!

    🙂

    Cheers,

    Stefan

    Reply

  3. Content Deployment – Getting it Right

    Reply

  4. Content Deployment – Getting it Right

    Reply

  5. Hi Stefan,

    First of all I would like to thank you for the great series of articles, they were useful and direct to the point.

    Now I have successfully exported/imported my SharPoint site from one server to another one, all the contents were moved but I faced 2 points:

    1. I faced error in my custom master page, although I can see it in the designer that it’s there but when I set my custom master page as the site master page it gives this error: File not found.  What’s the reason behind this error although the page was migrated as I saw in the designer but it shows the above error when I select it.  Any clue??

    2. Another point is the security migration, when I migrate the security groups it stars find during the import process then stopped with this error: User or group 23 cannot be resolved.

    Below is part of the log file related to the error:

    [5/11/2008 3:04:18 PM]: Progress: Importing Group NAS Owners.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 1.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 9.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 11.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 13.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 14.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 15.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 16.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 30.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group NAS Visitors.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group NAS Members.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Style Resource Readers.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 7.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Designers.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 1.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 10.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 16.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hierarchy Managers.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Approvers.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 1.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 9.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 14.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Restricted Readers.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Quick Deploy Users.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hala Duty Officer.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hala Staff Agent.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hala Operational Admin.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hala Shift Supervisor.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hala Financial Admin.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hala Marketing Admin.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hala Corporate Admin.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Hala Online Customer.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 9.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 17.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 18.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 19.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 21.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 22.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 23.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 24.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 25.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 26.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 31.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 32.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 33.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 34.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 35.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 36.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 37.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 38.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 39.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 40.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 41.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 42.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 43.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 44.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 46.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 47.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 48.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 49.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 50.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 55.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 56.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 57.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 60.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 61.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 62.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 63.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 64.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 65.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 66.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 72.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group NAS Survey Subscribers.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 9.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 17.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 18.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 19.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 21.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 22.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 34.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 44.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 54.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 55.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 65.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 72.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Editor.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 1.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 9.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 27.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 70.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Content Supervisor.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 9.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 67.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 73.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 74.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group News–FAQs–Polls Supervisor.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 9.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 54.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group Nassir Group.

    [5/11/2008 3:04:18 PM]: Progress: Importing Group member 1.

    [5/11/2008 3:04:18 PM]: Progress: Starting content import.

    [5/11/2008 3:04:18 PM]: Progress: De-Serializing Objects to Database.

    [5/11/2008 3:04:19 PM]: Warning: User or group 23 cannot be resolved.

    [5/11/2008 3:04:19 PM]: FatalError: User or group 23 cannot be resolved.

      at Microsoft.SharePoint.Deployment.DeploymentLogger.Log(DeploymentLogSeverity severity, SPDeploymentObject deplObject, String message, Boolean throwException)

      at Microsoft.SharePoint.Deployment.DeploymentLogger.Log(DeploymentLogSeverity severity, String message)

      at Microsoft.SharePoint.Deployment.ImportObjectManager.ConvertToDestUserId(Int32 userid, Boolean bAllowFallback, Boolean& bIsGroup)

      at Microsoft.SharePoint.Deployment.WebSerializer.DealWithGroupsOnImport(ImportObjectManager objectManager, DictionaryEntry property)

      at Microsoft.SharePoint.Deployment.WebSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)

      at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)

      at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)

      at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)

      at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)

      at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)

      at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()

      at Microsoft.SharePoint.Deployment.SPImport.Run()

    [5/11/2008 3:04:19 PM]: Progress: Import Completed.

    [5/11/2008 3:04:19 PM]: Finish Time: 5/11/2008 3:04:19 PM.

    [5/11/2008 3:04:19 PM]: Completed with 1 warnings.

    [5/11/2008 3:04:19 PM]: Completed with 1 errors.

    Any clue why this is happening?? For the time being I did import without security until I solve the master page problem.

    Regards,

    Hamzeh Ayesh

    Reply

  6. Hi Hamzeh,

    please open a support case so that your specific problem can be analyzed in more details.

    Cheers,

    Stefan

    Reply

  7. Stefan

    Is there a “best practice” for deleting list items or other pages when it comes to content deployment?  If list times are deleted on the source server will content deployment delete that same item on the destination server?  My experience working with MCMS and Site manager 2002 showed me that it was better to “expire” postings rather than delete them as our replication process could not delete postings or channels on the destination server.

    Thanks

    Franco

    Reply

  8. Hi Franco,

    incremental deployment will take care of deleted items. Full deployment will not take care.

    With MCMS it was the same. Incremental deployment reliably deleted items on the destination.

    Cheers,

    Stefan

    Reply

  9. Hi Stefan

    Thanks for your previous response.

    I read through items 3,4,5,6 and 7 of part 6.  I created a blank site using stsadm, ran a full content deployment successfully and scheduled incremental deployment.  However, a number of features on the destination server are still not activated despite being activated on the source server.

    Is there a way I can activate them without having to re-create the site collection and run a full content deployment?  This did not seem to work this first time.

    Thanks

    Franco

    Reply

  10. Hi Franco,

    are these standard features coming with WSS/MOSS or custom features?

    Cheers,

    Stefan

    Reply

  11. Stefan

    These are custom features developed by the vendor.

    Thanks

    Franco

    Reply

  12. Hi Franco,

    it is hard to tell what’s going on here without seeing a repro. I would suggest to open a support case to get this problem analyzed in more detail.

    Cheers,

    Stefan

    Reply

  13. Hi Stefan

    Great articles

    In our system we have an authoring and staging site collection on the same box (different web app).

    The first time we run a full deployment from auth to stage the files are OK, however then next time many files (css, master pages) are unghosted and have been reverted to a previous version of the files – as if they are pulled from some cache somewhere.

    Any advice on how to sort this out?

    Thanks

    Reply

  14. Hi Mark,

    a couple of days two hotfixes have been released which address a similar problem.

    Please open a support call with Microsoft and request the followig two hotfixes:

    952698, 952704

    Cheers,

    Stefan

    Reply

  15. Hi Stefan,

    This is " Ensure that content deployment jobs do not run in parallel".

    I have a custom migration job which runs every 15 mins and exports a package with data from few lists.

    Sharepoint content deployment also has a quick deployment feature, if my custom job is running and at the same point someone uses quick deploy on the same server,, will these 2 kill each other.

    They will be on the same server but different sites.

    Thanks

    Ajay

    Reply

  16. Hi Ajay,

    that means they can run in parallel. Meanwhile two hotfixes have been released to support this:

    952698, 952704

    Cheers,

    Stefan

    Reply

  17. As a follow up to my article series about the content deployment and migration API here are some tips

    Reply

  18. Hi Stefan,

    I am facing the following issue with respect to Incremental deployment.

    The incremental deployment fails with following error.

    "The object has been updated by another user since it was last fetched."

    Sometimes it gets rectified on its own while I never stop the incremental run.

    Other wise I always have to do a FULL to resolve the issue. I have MOSS with SP1 and content deployment post SP1 installed both in source and destination.

    Greatly appreciate your quick response

    Reply

  19. Hi Rajesh,

    I assume this happens during import. Can happen if you have updated content in the destination database. You should ensure that content is only updated on source – not on destination.

    Cheers,

    Stefan

    Reply

  20. Stefan

    Is it possible for me to do a sts adm back up from my 32 bit MOSS 2007 machine and restore it to my 64 bit machine?

    Reply

  21. Hi Stefan,

    Great Article.

    I have been using stsadm backup/restore to move my site between farms. It was a document workspace, didn’t require publishing features, and have not faced any problems so far. Having gone through your series of articles, i am now trying the same with Import/Export for testing. Import has been successful. For export, I first created a Document workspace in the destination site and then ran Import. Import failed. The error says "Could not find a feature". Now, i ‘ve come to know that the features on the source site must be first deployed on the destination site. However, i have a doubt here: there are lots of custom features installed in my development site but some of them only are activated. Now in the destination farm, should i deploy all the features (activated and non-activated) or only those currently active on my development site before running Import again?

    Thanks!

    Reply

  22. There has been a typo mismatch in my last comment.

    My export was successful and facing issue for Import. Sorry about that.

    Reply

  23. Hi Sanjaya,

    you have to install all features on the target. Feature activation should happen when performing the import.

    Are you exporting/importing the whole site collection or only a subsite?

    Cheers,

    Stefan

    Reply

  24. Thanks Stefan.Its a site collection but has a root web only at this time.

    Sanjaya

    Reply

  25. Hi Sanjaya,

    then you only have to install and not activate.

    Cheers,

    Stefan

    Reply

  26. Stefan,

    The ‘could not find feature’ error on Import is gone, but i’m now getting this error attached below.

    8/5/2008 1:28:11 PM :Started import to URL {}

    8/5/2008 1:37:45 PM :Configuration values are not defined in web.config file

    8/5/2008 1:37:45 PM :   at Microsoft.SharePoint.Library.SPRequest.ApplyTheme(String bstrUrl, String pVal)

      at Microsoft.SharePoint.SPWeb.ApplyTheme(String strNewTheme)

      at Microsoft.SharePoint.Deployment.WebSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)

      at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)

      at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)

      at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)

      at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)

      at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)

      at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()

      at Microsoft.SharePoint.Deployment.SPImport.Run()

      at sa.SharePoint.Sites.ImportExport.Form1.Import(String siteURL, String fileToImport)

      at sa.SharePoint.Sites.ImportExport.Form1.Import()

    I’ve ensured that all the conifguration values used by the application are added to web.config also.Do you have any clue?

    Reply

  27. Stefan,

    I figured out that the error i ‘ve posted in the last comment comes from my event receiver.

    I wonder why the event receiver is receiving itemupdating events while the import is running when the feature for the event receiver is only installed but not activated.

    How do i prevent the event receiver from receiving any events?

    fyi, i have some documents in the document libraries on the target site.

    Reply

  28. Hi Sanjaya,

    import automatically activates all features which are activated on the source site collection.

    Regarding suppressing: if you are using After events you can suppress them using SPImportSettings.SuppressAfterEvents = true;

    Cheers,

    Stefan

    Reply

  29. Hi Stefan.

    I’m working in a MCMS migration to MOSS 2007, and I have some problems with the process.

    The most important process is the follow:

    I run a migration process. The firts time this one is good, but, when I tried to make a incremental migration the follow error appears:

    The required attribute ‘Title’ is missing.

    What do you think about this?

    Regards.

    Reply

  30. Hi William,

    please open a support case to get this analyzed.

    Cheers,

    Stefan

    Reply

  31. If you are having problems with doing an import after a successful export then you need to make sure that in the ExportSettings.xml which is created on export that the FileLocation attribute points to where your export actually is.

    I was getting "Unhandled Exception: System.ArgumentException: Value does not fall within the expected range." because I moved my export from prod to my dev box under a different directory.  

    Great series of posts btw!

    Reply

  32. Hi Marc,

    I haven’t seen this issue.

    Can you provide more insights about when this happend?

    Cheers,

    Stefan

    Reply

  33. Stefan,thanks for a great post.

    I’m hoping you can help with a problem we have at present.

    We have succesfully done both a Full deployment and an Incremental deployment from DEV to TEST environments. The issue is that all the SSRS reports lose their data source connection reference. This can be fixed by remapping the DS link for a report via Manage Data Sources. The report will then run OK. The problem is that this needs to be manually repeated for All reports…any ideas.

    The problem seems to be that all the (Shared)Data Connections have no dependant items after they are deployed to the destination.

    Hope you can point us in the right direction.

    Thanks

    John

    Reply

  34. Hi John,

    this has not yet been reported before. Please open a support case with Microsoft to allow us to repro and analyze the issue.

    Cheers,

    Stefan

    Reply

  35. Hi Stefan,

    I got the following error during incremental content deployment ""The object has been updated by another user since it was last fetched"".

    As per your post you said that this can happen if destination is updated.

    Now destination is updated as I have contact us form on site which people fill and it writes to the list.

    I have removed the site containing the list from the incremental content deployment job.. do you think this is the right approach.

    If destination gets updated than will incremental deployment fail??

    Reply

  36. Hi Ajay,

    please try to restart incremental deployment and check if the same error reoccurs.

    If yes, then it is most likely not caused by the fact that you have authors working on the system.

    Because the update would need to happen while the import occurs to cause this problem.

    What is more common is that you have some features which register custom event receivers which fire during import.

    If these event receivers update the database when items are imported you can get such problems.

    Cheers,

    Stefan

    Reply

  37. Hi Stefan,

    Great series! Very detailed.

    I am currently trying to find out if we can add our own messages also to the log files that get created at "LogFilePath" specified.

    I have some custom logic in the "ObjectImported", "Completed" and other events, and want to log the success/failure/information from this code into the same logs which MOSS creates at "LogFilePath" specified for settings.

    Thanks,

    Rohit

    Reply

  38. Hi Rohit,

    interesting question!

    Honestly I haven’t looked into this till now.

    Cheers,

    Stefan

    Reply

  39. Hi Stefan,

    All of your posts are a great help!!

    I have one question though for an error that I haven’t seen much input from anyone about.

    Doing the content deployment, the site comes to be about 56 MB but it’s breaking the CAB files up into 4 separate ones. When it goes to the destination server it can’t find the ExportSettings.xml file then gives a SystemIO error saying the file is not found.

    How can one get around this?

    Thanks,

    Mike

    Reply

  40. Hi Mike,

    with 56 MB it will usually split up the cab into 6 pieces as 10 MB is the configured maximum.

    It will only exceed this size if there are single files which cannot be compressed below 10 MB.

    The error you mentioned indicates that not all the cab files are available on the import server.

    Are you using regular content deployment or a custom solution?

    If it is regular content deployment please check the status codes for DeployUpload.aspx in the IIS logs. This is used to upload the files.

    If something went wrong you should see a status code different from 200.

    Cheers,

    Stefan

    Reply

  41. SharePoint tiene un API para migrar contenido efectivo y poderoso.&#160; Dentro del ensamblado Microsoft

    Reply

  42. Hi Stefan,

    Really a great post on Content Migration!!!

    I have a problem here…I need to take a sub-site backup along with the content from one server and deploy it into other server…and the sub-site along with content is coming upto 25GB and when i run export command with cabsize 1024MB (as given in one site that this is the max limit we can give), its generating around 23 cab files. Now the problem is how do i run the import command with these 23 cab files…

    The name i have given while exporting is -filename Export.cab

    and its creating 23 cab files with name Export1.cab, Export2.cab,…..

    Now which one do i need to give in the import command -filename

    How do i deal with this problem??

    Thanks,

    Sheetal.

    Reply

  43. Hi Sheetal,

    ensure that all the files are in the same directory and then import the first file (Export.cab). It will also import the other files.

    Cheers,

    Stefan

    Reply

  44. Hi Stefan,

    Recently i used import/export API write a copy content web tool. When import a publishing web to other site collection which don’t have exported publishing web, in my code in access the newly that publishing web and it throw NullReferenceException? but i try to sleep threed a few minutes and access again then it worked fine ? How can i access it without sleep?

    Reply

  45. Hi Steel,

    sounds to me as if the date/time in the different servers of your farms are not in sync.

    I would recommend to use a timeserver to ensure that the servers are in sync.

    Cheers,

    Stefan

    Reply

  46. Hi Stephan, I found your article really interesting and I would like to ask you a question.

    I have the following requirement : I need to be able to copy a document to another site and still keeps the versions and metadata (from a administration custom page)

    I see that using Sharepoint.Deployment I could do that but do you think that it’s viable solution ? It’s not too "heavy" ? or it’s really not designed for this purpose ?

    thx in advance

    Reply

  47. Hi GillouX,

    this API is designed to handle this scenario.

    Cheers,

    Stefan

    Reply

  48. Hello Stepan,

    I would like to know if it’s possible to move a document to another site (SPWeb) while keeping its UniqueID?

    this another site does not have the same structure as the source but the Document Library is created using the same list definition.

    I’ve tried to set RetainObjectIdentity at true in the import settings but it does not seem to be so easy 😀

    thx in advance

    Reply

  49. Hi GillouX,

    no this is not possible.

    Cheers,

    Stefan

    Reply

  50. Hi, I would like to know if you can help me, I started working with Sharepoint about 2 weeks ago. Now, I work for a company that develops SP Sites etc. for other clients. I receiverd the task of creating an application with a user interface that backups what you choose to backup.

    This must be a full on working application where you can choose the site, then subsites, custom web parts and custom master pages to backup. You must also be able to backup an entire site from the application.

    I come from a web development background but have never worked with backups etc…so I have no clue where to begin.

    I have spoken to my senior and he saiod that we would have to build everything from scratch and that we would not be able to use either the integrated Sharepoint.Administration.Backup or stsAdm.

    Someone said I must look at the SPExport commands and to export the site as a template.

    I cannot find sufficient info regarding backing up the site on the net as it is only the usual.

    Please help

    Jurie

    juranhuman@gmail.com

    Reply

  51. Hi

    I am trying to import an entire site collection. The files I export are consistent and I can’t see that anything is fluctating there…

    Once I have exported I create a new empty site like you said with stsadm.

    As soon as I import I get random results. Either where the sites have to be in their tabs it gives me an error. Otherwise. It will create all the sites under the site collection but as soon as a site has a sub site. It shows the site but says that the page does not exist. Same with the subsite.

    What am I doing wrong here…??

    Here is my code for import and export:

    –Export–

    SPExportSettings settings = new SPExportSettings();

               settings.SiteUrl = cboSiteCollection.SelectedItem.ToString();

               settings.ExportMethod = SPExportMethodType.ExportAll;

               settings.FileLocation = @"c:export";

               settings.FileCompression = false;

               settings.CommandLineVerbose = true;

               SPExport export = new SPExport(settings);

               export.Run();

    –Import–

    SPImportSettings settings = new SPImportSettings();

               settings.SiteUrl = cboSiteCollection.SelectedItem.ToString();

               settings.FileLocation = @"c:export";

               settings.FileCompression = false;

               settings.RetainObjectIdentity = false;

               SPImport import = new SPImport(settings);

               EventHandler<SPDeploymentEventArgs> eventHandler = new EventHandler<SPDeploymentEventArgs>(OnImportStarted);

               import.Started += eventHandler;

               import.Run();

           }

           private void OnImportStarted(object sender, SPDeploymentEventArgs args)

           {

               SPSite site = new SPSite(cboSiteCollection.SelectedItem.ToString());

               SPWeb web = site.RootWeb;

               SPImportObjectCollection rootObjects = args.RootObjects;

               foreach (SPImportObject io in rootObjects)

               {

                   io.TargetParentUrl = web.Url;

               }

               web.Dispose();

               site.Dispose();

           }

    Please note that the code will look strange with some characters not to be there…but I just took snippets from an application I am writing.

    Regards

    Jurie

    Reply

  52. Unable to import the folder _catalogs/lt/Forms/List Template Gallery. There is already an object with the Id 07a117d4-3ff0-420a-88ba-c3707371d896 in the database from another site collection.

    We have multiple host header site collections in single web app and we have content deployment jobs running from dev to qa to prod.

    In one case we had to delete one site collection from prod and then needed to run the job again but now it shows below error.

    There is already an object with the Id 07a117d4-3ff0-420a-88ba-c3707371d896 in the database from another site collection.

    Now in few blogs its writen that you need to delete web app and recreate it which is not possible in our case as there are number of site collections in single web app.

    How to fix this issue. Also in future if we need to delete one site collection then job is going to fail. Need some inputs on this

    can we delete this id reference(07a117d4-3ff0-420a-88ba-c3707371d896 ) form database

    using powershell?

    ——————————————————————————–

    Reply

  53. Hi Amit,

    I haven't seen this issue. Please open a support case to get this analyzed in more details.

    Thanks,

    Stefan

    Reply

  54. Hi Stef,

    I've got error like this when deploy from MOSS to US

    Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) at Microsoft.SharePoint.Library.SPRequest.SetListProps(String bstrUrl, String bstrListName, Boolean bMigrate) at Microsoft.SharePoint.SPList.Update(Boolean bFromMigration) at Microsoft.SharePoint.Deployment.ListSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject) at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope) at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader) at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects() at Microsoft.SharePoint.Deployment.SPImport.Run()

    Content deployment job 'Remote import job for job with sourceID = 59d0cbe2-61c5-4fab-b7c3-13f89b868ada' failed.The exception thrown was 'Microsoft.SharePoint.SPException' : 'Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))'

    Can you give me some clue?…

    Reply

  55. Hi Zoel,

    I haven't seen this error.

    If this problem occurs with the latest patches I would recommend to open a support case to get this analyzed.

    Cheers,

    Stefan

    Reply

  56. [2/10/2012 2:05:39 PM] [List] [Documents]   ExtendedVerbose: Deleting views.

    [2/10/2012 2:05:39 PM] [List] [Customer Testi] Progress: Importing

    [2/10/2012 2:05:40 PM] [List] [Pages] Progress: Importing

    [2/10/2012 2:05:41 PM] ExtendedVerbose: Updating field Corporat0.

    [2/10/2012 2:05:41 PM] [List] [Pages]   Error: A duplicate field name "85a4dab0-dc41-4256-8551-ef7ed8785a2d" was found.

    [2/10/2012 2:05:41 PM] [List] [Pages]   Debug:    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)

      at Microsoft.SharePoint.Deployment.ListSerializer.CreateOrUpdateField(SPList list, String fieldName, XmlNode fieldNode)

      at Microsoft.SharePoint.Deployment.ListSerializer.UpdateListFields(SPList list, Dictionary`2 listMetaData)

      at Microsoft.SharePoint.Deployment.ListSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)

      at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData(Object obj, SerializationInfo objectData, ISerializationSurrogate surrogate, ISurrogateSelector selector)

    [2/10/2012 2:05:41 PM] FatalError: A duplicate field name "85a4dab0-dc41-4256-8551-ef7ed8785a2d" was found.

    [2/10/2012 2:05:41 PM] Debug:    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)

      at Microsoft.SharePoint.Deployment.ListSerializer.CreateOrUpdateField(SPList list, String fieldName, XmlNode fieldNode)

      at Microsoft.SharePoint.Deployment.ListSerializer.UpdateListFields(SPList list, Dictionary`2 listMetaData)

      at Microsoft.SharePoint.Deployment.ListSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)

      at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData(Object obj, SerializationInfo objectData, ISerializationSurrogate surrogate, ISurrogateSelector selector)

      at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)

      at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)

      at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)

      at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)

      at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()

      at Microsoft.SharePoint.Deployment.SPImport.Run()

    [2/10/2012 2:05:41 PM] Progress: Import did not complete.

    [2/10/2012 2:05:41 PM] Finish Time: 2/10/2012 2:05:41 PM.

    [2/10/2012 2:05:41 PM] Duration: 00:00:24

    [2/10/2012 2:05:41 PM] Finished with 4 warnings.

    [2/10/2012 2:05:41 PM] Finished with 2 errors.

    Reply

  57. That can happen if a field is first added to a sub site and later to the root site. Then the field will show up as duplicate in the sub site due to inheritance of the parent site field.

    The only way to fix is it to remove the field from the sub site.

    Reply

  58. Hi Stefan,
    I am doing content deployment through code and getting below error ::
    Thread was being aborted._
    at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData(Object obj, SerializationInfo objectData, ISerializationSurrogate surrogate, ISurrogateSelector selector)
    at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)
    at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)
    at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
    at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
    at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects() at Microsoft.SharePoint.Deployment.SPImport.Run()
    at ImportData_CD.ImportData.ImportData.<>c__DisplayClass2.b__1()
    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.b__2()
    at Microsoft.SharePoint.Utilities.SecurityContex
    please provide any needful solution.
    Thanks,
    Tarun Sharma

    Reply

  59. The error indicates that an exception has occurred while deserializing the objects from the export file into the target site collection. From the error it is neither possible to say which object nor why the exception has occurred.
    If this would happen to me I would attach a debugger and take a dump to analyze this in more detail.
    If you need assistance on this I would recommend to open a support case with Microsoft.
    Cheers,
    Stefan

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.