Stefan Goßner

Senior Escalation Engineer for SharePoint Products and Technologies

Deep Dive into the SharePoint Content Deployment and Migration API - Part 1

Deep Dive into the SharePoint Content Deployment and Migration API - Part 1

  • Comments 114
  • Likes

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


Today I would like to start an article series on an interesting new feature in WSS 3.0: the Content Deployment and Migration API. A similar API has previously been provided in MCMS 2002 and was also added to WSS after MCMS was integrated in MOSS 2007. This first part will provide an overview about the API itself. In future chapters I will then demonstrate how to utlize this API to enhance your own applications or to get a better granularity than the out of the box tools allow you to do - e.g. how to copy a document library or a list to a different site collection.

WSS and MOSS use this API at various different places:

  • Content Deployment
  • STSADM -o export and import
  • Copy/Move operations in Site Manager
  • Variations
  • MCMS 2002 database migration to MOSS 2007

Actually any time when content needs to be copied or moved to a different location either in the same or in a different site collection.

Feature set of the Content Deployment and Migration API

The Content Deployment and Migration API provides the following features:

  • export an entire site collection
  • export a specific site inside a site collection including or excluding content in subsites
  • export a list or document libraries or even of a folder inside a document library
  • export a single list items or documents from a document library
  • export dependent objects (like images referenced by a page) by following links
  • generate as a compressed export file or in uncompressed format
  • allow export with a define a maximum size for the generated compressed file (multiple export files will be created if required)
  • allow incremental export of items based on a given change token. This will export all items that have been created, changed or deleted after the timestamp in the change token.
  • import the exported content with or without identiy preservation (means items will keep their GUID or not)
  • import the exported content under the same or a differnt parent in the destination database
  • do link fixup during import

For people who have also worked with Microsoft Content Management Server (MCMS) 2002 here is a feature comparison between the site deployment API of CMS 2002 and the content deployment and migration API coming with WSS:

MCMS 2002
WSS 3.0
incremental deployment  
full deployment  
deployment of a subtree of the site structure  
deployment of specific selected items  
deployment of dependent items  
deployment by ignoring the dependencies  
deployment of child elements of the exported elements  
deployment without exporting of child elements  
import with preservation of the last modified date of the source item  
import without preservation of the last modified date of the source item  
export of image libraries/resource galleries  
support import at multiple locations in the site hierarchy  
can be used to migrate 3rd party content  

Programming Reference

Assembly: Microsoft.SharePoint.dll
Namespace: Microsoft.SharePoint.Deployment

Important Objects:

  • SPExport - controls the Export process
  • SPExportSettings - used to configure the export process
  • SPExportObject - defines which objects need to be exported
  • SPImport - controls the import process
  • SPImportSettings - used to configure the import process

You will find details about these objects in the MSDN:

Rather than listing all the different properties and methods of these objects (which are already documented on MSDN) I will explain how to use these objects by providing some "real-world" samples in the next chapters:

  • Part 2 - Providing some real world samples on export
  • Part 3 - Providing some real world samples on import
  • Part 4 - Advanced content deployment scenarios
  • Part 5 - Avoiding common problems
  • Part 6 - Requirements for a successful content deployment

  • PingBack from

  • Stefan is back! J Stefan is in Redmond this week, and we had a chance to catch up! In fact, I had dinner

  • Stefan Goßner taucht in einer vierteiligen Serie in die Tiefen der SharePoint Deployment und Migration

  • [ Part 1 - Part 2 - Part 3 - Part 4 ] Providing some real world samples for import After we managed to

  • [ Part 1 - Part 2 - Part 3 - Part 4 ] Providing some real world samples for export To demonstrate how

  • Fantastic, incredibly detailed, content on content deployment by Stefan

  • [via Stefan Gossner ] This past week I was in Redmond teaching my WCM401 development class in an open

  • En la última versión de SharePoint se ha incluido un interesante conjunto de herramientas que permite

  • Body: Great series of posts by Stefan on how to use the Content Migration API. Very timely for me as

  • If you haven't seen it already, Stefan Goßner has published a great series on how to develop using the

  • Stefan Goßner has published a four article series on how to develop using the Content Deployment and

  • 今天凌晨加班的时候偶然翻到 Stefan Gossner 的这几篇文章,强烈推荐给大家: Deep Dive into the SharePoint Content Deployment and Migration

  • I'm having difficulty with export/import of a site from one farm to another.  The problem has to do with the Data View Web Parts that are in the site.  Apparently, they persist reference to the GUID of the datasource (list)?  Do you have any guidance for this scenario?  Thanks.

  • Hi David,

    is the list the data view web part points to also in the package?

    Anyway: I would suggest to open a support call to get investigated if this should work or not.

    I personally haven't looked into the details of this till now.



  • Stefan Goßner has put together a terrific 4-part series on the SharePoint Content and Deployment API

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Raw Html Fix