Search Wiki:
Project Description

UPDATE: Release 1.0 version released 22 June 2008 - see Release 1.0 page for release notes

The SharePoint Content Deployment Wizard is a tool for SharePoint 2007 which provides the means to deploy the following content:

- site collections
- webs
- lists
- folders
- list items (including files)

Content is exported using the Content Migration API (PRIME) as a .cmp file (Content Migration Package) which can be copied to other servers for import. Unlike the out-of-the-box tools, the Wizard allows *granular* selection of content via a treeview.

The two screenshots which probably illustrate the concept of the tool best are:

Export selection screen:

CDW_ExportSelect.jpg

Import settings screen:

CDW_ImportSettings.jpg

N.B. The import operation overwrites your site data, always take a backup before importing.

More details (taken from readme)

Usage notes

  • The tool must be installed locally on the server which hosts the site
  • Site URL - enter using format http://source.test.dev
  • Import web URL - enter using format http://target.com/targetweb
  • See 'permissions' note lower down

Import/Export characteristics

Since the Content Migration API is used, imports/exports have the following characteristics:

    • dependencies of selected content (e.g. referenced CSS files, master pages) are automatically included in the export - check 'Exclude dependencies of selected objects' to disable this
    • all required content types, columns etc. are automatically included in the export
    • in contrast to STSADM export, it is possible to retain GUIDs during deployment (where objects are not being reparented) - check 'Retain object IDs and locations' to enable this
    • no filesystem files (assemblies, SharePoint Solutions/Features etc.) are deployed - these must already be present on the target for the import to succeed)
    • the following content does not get captured by the Content Migration API - alerts, audit trail, change log history, recycle-bin items, workflow tasks/state

Reparenting

Reparenting of objects such as webs and lists is possible with the following usage on the import:

- enter the URL for the target web in the 'Import web URL' textbox
- ensure 'Retain object IDs and locations' is not checked

Permissions

The Content Migration API (PRIME) is used to package the content as a .cmp file, which can be copied to another
server for import. The application MUST be run from the SharePoint server(s), and MUST be run under the context
of an account which has appropriate SharePoint permissions - currently the way to specify an alternative user
to the currently-logged on user is by using the 'Run as..' feature in Windows 2003 (right-click on the .exe and
select 'Run as..').

See my blog post 'Introducing the SharePoint Content Deployment Wizard' for more screenshots and information - http://www.sharepointnutsandbolts.com/2007/12/introducing-sharepoint-content.html

Chris O'Brien
http://feeds.feedburner.com/ChrisObrien
Last edited Jun 22 at 7:39 PM  by chrisobrien, version 15
Comments
Also available: 1 review for current release.
MrSciFi wrote  Dec 5 2007 at 11:56 PM  
Thanks for the tool. I'll be testing this out and am sure it will save a lot of time. Do you know if the tool will still work with SharePoint SP1 (out soon)?

chrisobrien wrote  Dec 6 2007 at 10:15 AM  
Yes, the tool will still work with SP1..

chrislavoie wrote  Dec 6 2007 at 1:48 PM  
This looks great, thank you. I have a custom list containing a mix of items and folders and I want to move items to folders in the same custom list. Does this tool have the ability to do that?

wdupreez wrote  Dec 6 2007 at 4:47 PM  
Well done matey - it looks good!

chrisobrien wrote  Dec 7 2007 at 1:29 PM  
@chrislavoie:

Folder support at the moment is like this:
- if you export a list and include descendents, when this is imported the folder structure will be respected
- currently it is not possible to export a folder only, this is coming in next beta (mid-December)

Hope that answers your question, let me know if not..

sezai wrote  Dec 10 2007 at 5:51 AM  
Chris, Do you have any plans to release the source code for this tool ?

chrisobrien wrote  Dec 10 2007 at 2:22 PM  
@Sezai:

Not at this stage I'm afraid, partly because I'm planning a fairly big refactoring as part of a later release. Might be a possiblity after that though..

stanliu wrote  Dec 20 2007 at 10:34 PM  
Is there any plan to enable remote connections to manage sites from any location rather than directly on the SharePoint server?

chrisobrien wrote  Dec 21 2007 at 3:12 PM  
@stanliu:

I agree this would be useful functionality. It's certainly something I'll look into, but afraid I can't tell you a definite timeframe when this capability might be added. Thanks for the suggestion.

saruhiko wrote  Feb 6 at 3:17 AM  
Thanks for great tool.This is just what I wanted! However I'm facing a problem. When I export '/list1/' of site A and import it into site B ,and if there is already '/list1/' exists in site B, import fails.Is it possible to solve this problem in next release?

mrM wrote  Feb 13 at 4:47 PM  
Hi, whenever I try to import something, the wizard crashes after the confirmation screen. It displays "Starting import" for a split of a second, then it just quits. I tried different systems, different items to import... Export is just fine. Any idea?

chrisobrien wrote  Feb 17 at 12:03 PM  
@saruhiko:

This error is coming from the underlying SharePoint API rather than the wizard. I think you need to specify that object GUIDs should be retained, so the import will overwrite the existing objects. Check the checkbox for 'Retain object IDs and locations' if you're not already. If you are setting this flag (and you're able to test such things), try not setting it to see what effect that has..

chrisobrien wrote  Feb 17 at 12:04 PM  
@mrM:

I've not seen that behaviour before. What does the log file for your import operation say? (The location where this file will be saved to is displayed in the tool).

mrM wrote  Feb 19 at 11:38 AM  
Chris, a log file is not even generated. Looks like the wizard dies before...

chrisobrien wrote  Feb 20 at 1:27 PM  
@mrM,

Is there any indication of what exception is happening? Alternatively, if you drop me a line via the contact form, I'll be able to send you a preview of the next release in a few days time. This has logging in the tool (not just from the SharePoint API) which would enable us to pinpoint the problem better. Apologies for the inconvenience in the meantime.

P.S. Something else to try might be doing the import under different accounts (by right-clicking on the .exe and doing 'Run as..').

naba wrote  Feb 22 at 8:25 AM  
Dear Mr.O'Brien:
Can this tool be used even by Group Board V3.0 or SharePointServer2003 ?

thompal wrote  Feb 23 at 11:11 AM  
Hi Chris
Do you already have a version where you not loading the whole site structure in one hit?
When testing the wizard with a publishing site with a deep site structure I'm only getting an "System.OutOfMemoryException" exception during the "Binding to site - please wait" step.

thanks,
thomas

davesatz wrote  Feb 25 at 4:27 PM  
Hi Chris,
Thanks for this great tool!

I am unable to import a set of lists with custom event receivers. I noticed that each list contains the <EventReceivers> sections in the Manifest.XML in the CMP file. I even uninstalled the development solution/feature and install the production version since the error I get is System.InvalidOpertion: could not load file or assembly and then the name of the DLL for the feature. The feature is loaded and working on the site and using the same version/publickeytoken the error message says the import is looking for. Any idea why this is not working/how to fix it?

Regards,
Dave

chrisobrien wrote  Feb 27 at 11:48 PM  
@naba,

No I'm afraid not, only SharePoint 2007..

chrisobrien wrote  Feb 27 at 11:52 PM  
@thompal,

Yes, look for the beta 2 release on the 'releases' tab - I've just uploaded it now. I've done some testing of this release in memory pressure situations and it does seem to handle it better. The tool definitely does require a certain amount of memory to build the tree, but it gets released as soon as no longer required. I'd be interested to hear if you still have problems with the new release, let me know..

chrisobrien wrote  Feb 27 at 11:55 PM  
@davesatz,

I've usually seen this error when the assembly for the event receiver genuinely isn't present, or has a different name (version number/public key token etc.). I'd certainly suggest double-checking - how about writing a few lines of code in console app to try to load the assembly with reflection? This helped has helped me pin down why I was getting this error in the past.

Could it be that the list in dev is associated with a different assembly version to what is on production?

thompal wrote  Feb 29 at 5:12 PM  
It would be nice if you could also implement an option for approving all imported content.

chrisobrien wrote  Mar 3 at 3:21 PM  
@thompal,

Good suggestion I'll bear that in mind. Along similar lines I was also thinking about doing something with files checked out on the target, since the deployment does not overwrite these..

chrisobrien wrote  Mar 4 at 2:27 AM  
@davesatz,

In reference to your earlier problem a colleague of mine has just experienced this, despite the fact the assembly genuinely was in the GAC. Interestingly Reflector was not seeing the assembly there however, and on trying to add the assembly again using gacutil.exe, an "unexpected error" was reported. Rebooting the server however made this go away, and the Wizard then imported successfully.

Some bizarre GAC file locking/caching perhaps? If you still have the problem and you're able to, it seems a reboot might help..

thompal wrote  Mar 7 at 2:09 PM  
Another feature request: it would be nice if you could implement partial list export. What I mean is exporting just a subset of the list (perhaps by applying a CAML query).

chrisobrien wrote  Mar 8 at 7:14 PM  
@thompal,

Does picking the individual list items you want not work for this? Or is the scenario where you are working with large lists?

Thanks..

MorS wrote  Mar 12 at 8:51 AM  
Hello,
First off, you have a grate tool, but you said that you can retain the GUIDs of objects, how do you do that through the API? as far as I know it can only be done to fields.

Thank you.

ebkheder wrote  Mar 13 at 9:11 PM  
I am trying to use the content Deployment Wizard to deploy a Record Center site under new Web application. All the process is completed without any error. When I use Send To command to send a document to the record center, I receive the following error: The RC Records Center could not be found or accessed. I have verified my Record Center configuration and all seams correct.

chrisobrien wrote  Mar 14 at 1:01 PM  
@MorS,

The key is to use the SPImportSettings.RetainObjectIdentity property.

HTH,

Chris.

chrisobrien wrote  Mar 14 at 1:02 PM  
@ebkheder,

This could be to do with the link which is used to pass a document into the Record Center. This would appear to be the case particularly if the actual records site imported OK. Unfortunately I've never worked with this part of the product so can't advise on how this link works - does it use a CustomAction within a Feature?

Chris.

erin2davie wrote  Mar 17 at 10:10 PM  
Any plans to include the transfer of security settings like user permissions? This would be extremely helpful when simply moving content around while maintaining permissions for each folder, list item, etc.

chrisobrien wrote  Mar 20 at 3:43 PM  
@erin2davie,

Security on such items can be exported/imported right now. To do this, set the 'IncludeSecurity' option on both the export and import operations. Let me know if there's a specific scenario where this doesn't work for you..

jmaddrey wrote  Apr 2 at 7:39 PM  
Chris, I have a question regarding the security context that the tool runs under. Is there an approach to export/import if the moss site is using FBA?

chrisobrien wrote  Apr 3 at 1:43 PM  
@jmaddrey,

Good question. Unfortunately because the Wizard is a Windows app, it has no awareness of the authentication provider you have specified in a web.config file. This means the only real authentication mechanism is Windows auth.

To work round this in a FBA scenario, you would extend the web application onto a site which uses Windows auth as the provider. This would need to be done on both source and target, but then these URLs can be used with the Wizard and everything should work fine.

HTH,

Chris.

sichechim wrote  Apr 15 at 7:22 PM  
Hey Chris,
Thanks a lot for all your hard work... I am on a scenario where I need to make a copy of our site collection (single server) to another machine (also single server). What are the requirements? can I do it? can I just export my site collection from one machine to another? Do I need to have the whole MOSS installed first with DB and all?
Have a great day,

chrisobrien wrote  Apr 22 at 11:50 AM  
@sichechim,

Sorry for the delay, I've only just seen this comment. Sure you can do it - in the Wizard you would just enter the URL of your site collection, and then select the top node in the treeview to export entire site collection. You certainly do need a full MOSS environment (with site collection already created) at the other end to import into though.

HTH,

Chris.

fer wrote  May 8 at 1:09 PM  
Great tool.

Update on my own questions
We used it for exporting and importing a WCM site from test to acceptance server. All content is transferred and visible/accessible via the Site content and structure, but the web isn't accessible via the domain. I think we should have to check (domain) settings in SCA for this? => Solution: after importing the content, you first should change the master page to your own masterpage. In our case, it was set to BlueBand.

A question for Chris: does this tool work on a 64-bit MOSS environment? We want to use this tool for exporting from a single 32-bit server (this works great!) and hereafter importing on a multiserver 64-bit environment (2-server setup: database is separated from frontend server) ? => Solution: Yes, it works on x64 MOSS. We managed to deploy all content to the x64 environment. However, because of other security architecture, we couldn't "copy" the security settings (rolegroups and users). Luckiliy we were able to non include the security settings with the same .cmp !

Really interested how Microsoft had planned their deployment method of content (other than built in)... only via API? This tool definately should be a part of the next release of SP, as site manager was for MCMS!
Keep up the good work and looking forward to the final release of SPCDW!

kandigo wrote  May 10 at 2:12 PM  
Hi Chris,

This is a great tool. It is more than helpful to move the content between the farm. Is it possible to download the scource code for this tool? I would like to learn how the memory is being managed by your application, as I am having some memory issues using some of our web parts.

Keep up the good work!!
Thanks,
Kandigo

chrisobrien wrote  May 13 at 1:34 PM  
@fer,

Thanks for your post, that's good information and glad to hear you got there - btw did you ask these questions elsewhere (e.g. my blog)? I would have answered them myself if I had seen them :-)

P.S. I agree it does seem a bit of hole that the standard product doesn't have the capability of doing this. That's basically what prompted me to attempt to fill the gap. More features coming soon..

<