Thursday 28 February 2008

New version of Content Deployment Wizard released

I'm happy to announce that development/testing of the next version of the SharePoint Content Deployment Wizard is now complete, and the new release has been uploaded to Codeplex. If you're not aware of the tool then Introducing the SharePoint Content Deployment Wizard is a good place to start. I'm calling this release "beta 2", which indicates the tool is by no means complete, but is significantly more mature than the original version. I'd encourage all of the 1400+ people (and counting) who downloaded the original in the past few weeks to get the latest version - the link is at the bottom of this post.

So let's run through the improvements:

  • Better support for large sites:

    The treeview of the site is no longer built in one hit - instead, portions of the site are retrieved as webs/lists are expanded. This can make a huge difference when working with large sites.

  • Support for WSS-only sites:

    The dependency on the MOSS assembly (Microsoft.SharePoint.Publishing) has now been removed, so imports/exports to WSS sites are now possible. The MOSS-specific functionality is only used if we are indeed in a MOSS environment - if you're interested, this is just related to honoring any publishing schedules (i.e. page expiry) from the source site on the target site.

  • Everything in one .exe:

    No separate WizardBase.dll any more.

  • Easier access to log files after import/export:

    Since it's highly important to analyze the log file for errors/warnings after an import/export, these now open automatically in notepad at the end of the operation. There's also a link in the tool to open the log file, so no more manual digging around the filesystem.

  • Auto-discovery of sites in 'Site URL' box:

    No need to re-enter the site URL each time - the sites available for selection in your SharePoint environment are automatically shown in the auto-complete entries for the textbox:

     AutoSiteDiscovery

  • Pretty icons in treeview :-)

    Easier visual distinction between objects in the tree:
     TreeViewImages

  • Logging via System.Diagnostics.Trace:

    In addition to the log file generated by the actual import/export operation, general operations in the tool are now also logged (separately) via System.Diagnostics. So if you have a problem using the tool, it should be easier to pinpoint the actual error - enable by adding a .config file with a TraceSwitch entry for "COB.SharePoint.Utilities.ContentDeploymentWizard" and appropriate TraceListener entries.


  • More reliability:

    Miscellaneous minor bug fixes, including removal of the somewhat psychedelic flickering as the confirmation screen is built.

In terms of issues reported in the first release, it seems that 95% of them have been related to the underlying Content Migration API provided by SharePoint rather than the actual Wizard - this means the issue would also likely surface if out-of-the-box Content Deployment (via Central Admin) or STSADM -export was used to deploy the content instead. This is in line with what I was expecting since in many ways the Wizard doesn't actually do that much - it just presents a nice UI (with the ability to cherry-pick exactly which items should be deployed) onto existing SharePoint code. Since there are some gotchas with the MS bits however, it does mean that understanding how their API works can help when using the Wizard. My recommended reading list for those wanting to know more would be:

The future

I've had great feedback so far (ranging from feature requests to "why the hell don't you charge for this thing?!" to offers of collaboration). In terms of features, it looks like incremental deployment is the most popular vote so far so I'm hoping to add this fairly soon. Another possibility is making the Wizard scriptable by refactoring the code into something more tiered, thus providing features like the ability to save configurations for import/export jobs and also allowing them to be hooked up to a task scheduler in some way. 

However, the more feedback the better and if you'd like to see particular functionality or have run into problems trying to use the tool I'm definitely keen to hear. Either leave a comment on the blog or over at the Codeplex site.

The download link
 

Go to www.codeplex.com/SPDeploymentWizard and go to the releases tab to download the latest version. Hope you find it useful.

17 comments:

Pascal Van Vlaenderen said...

Hey,

I really appreciate your work on this !!!!

Thanks a lot,

Pascal Van Vlaenderen

Unknown said...

Hi Chris

I haven't used the tool yet but a colleague has, and he said it worked perfectly for copying most of the lists he tried. However, it failed to copy items within folders in a list. Perhaps something to investigate?

Chris O'Brien said...

@caterwomtious,

I'll double-check as soon as I can but I'm pretty sure the new release will cope with this. I can say that folders were not properly supported in beta 1 however.

Thanks for the comment,

Chris.

Unknown said...

Hi There,

We are new to Moss and we are trying to move a complete site from our test server into production. We would like to be able to retain the guids if possible. I am able to do a clean export of the web application (no erros in log) but when I copy this to another server (a dev one at this stage) and do the import with retain object identity specidfied it crashes everytime with a Sharepoint exception saying the specified name is already in use. The error in the log is:

.............
2/29/2008 11:53:02 AM: Progress: Importing List User Information List.
2/29/2008 11:53:04 AM: Progress: Importing List Web Part Gallery.
2/29/2008 11:53:06 AM: Progress: Importing List Site Template Gallery.
2/29/2008 11:53:07 AM: Progress: Importing List Cache Profiles.
2/29/2008 11:53:07 AM: FatalError: The specified name is already in use.

A list, survey, discussion board, or document library cannot have the same name as another list, survey, discussion board, or document library in this Web site. Use your browser's Back button, and type a new name.
at Microsoft.SharePoint.Library.SPRequest.CreateListOnImport(String bstrUrl, Guid& pguidListId, String bstrTitle, String bstrDescription, Int32 lTemplateID, String bstrFeatureId, Guid guidRootFolderId, Int64 llFlags, Int32 iVersion, Int32 iAuthor, String bstrFields, String bstrContentTypes, String bstrImageUrl, String bstrEventSinkAssembly, String bstrEventSinkClass, String bstrEventSinkData, Guid guidDocTemplateId, String bstrViews, String bstrForms, Boolean bCompressedSchema)
at Microsoft.SharePoint.Deployment.ListSerializer.CreateList(SPWeb parentWeb, Dictionary`2 listMetaData, Boolean usingPublicSchema)
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()
2/29/2008 11:53:07 AM: Progress: Import Completed.
2/29/2008 11:53:07 AM: Finish Time: 2/29/2008 11:53:07 AM.
2/29/2008 11:53:07 AM: Completed with 0 warnings.
2/29/2008 11:53:07 AM: Completed with 1 errors.
..........

An import without the retain object identiy is successful (with a few warnings) and the site is created. I downloaded your new beta 2.0 version but get the same result. Can you help?

Belinda Olds

Chris O'Brien said...

Hi Belinda,

Usually this error occurs when one of the prerequisites for successful content deployment isn't true:

- target site was created with blank site definition (also, since both source and target must be created with the same definition, it follows your development site should also be based on 'blank')
- the publishing feature is not activated for the first deployment (this will be activated automatically during the deployment)

I noted elsewhere that these bits of SharePoint are slightly pernickety, and I should probably highlight this more to give guidance in this area. On that note see http://support.microsoft.com/default.aspx/kb/923592 for a variation on the error you're experiencing.

HTH,

Chris.

Unknown said...

Hi Chris,
Thanks for the response which helped me sort it out. Once I created the target site with the blank site template it worked! Your tool is going to make my life a lot easier!

Cheers
Belinda

Ramesh Krishnan said...

Hi Chris,

Thank you for the tool. It really helped me a lot.

Is the source code publicly available on Codeplex to download and if yes, How could I get a hand on the code

Chris O'Brien said...

Hi,

I'm afraid right now I'm not distributing the source code. I might take a different view in the long-term, but that's the situation for now.

Cheers,

Chris.

Anonymous said...

Hi Chris,

you've done a great job - thanks for sharing. At the moment I got only one issue: when creating a wokflow within the settings of a document library this workflow isn't deployed to the target site. Other document library settings like versioning or added content types are deployed. How can I deploy the workflow(s) too?

Regards

Daniel

Chris O'Brien said...

Hi Daniel,

Thanks for the feedback. I'm afraid moving workflows isn't supported, since the underlying Microsoft API does not have this capability.

In Using the Content Deployment Wizard, I note:

The following content does not get captured by the Content Migration API - alerts, audit trail, change log history, recycle-bin items, workflow tasks/state.

Sorry if that's not the answer you were hoping for.

Chris.

Anonymous said...

Hi Chris,

I exported my site fine, but when it came to importing it, I got an error. Here are the final few lines from the import log.

Progress: Importing File WorkflowTasks/MyGrTsks.aspx.
Progress: Importing File WorkflowTasks/MyItems.aspx.
Progress: Importing File WorkflowTasks/NewForm.aspx.
FatalError: A duplicate name "phone" was found.
at Microsoft.SharePoint.SPFieldCollection.AddFieldToWeb(String strXml, Boolean checkDisplayName)
at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op)
at Microsoft.SharePoint.Deployment.FieldTemplateSerializer.CreateField(SPWeb web, SerializationInfoHelper infoHelper)
at Microsoft.SharePoint.Deployment.FieldTemplateSerializer.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()
Progress: Import Completed.
Finish Time: 4/17/2008 10:44:05 AM.
Completed with 29 warnings.
Completed with 1 errors.

Steve

Chris O'Brien said...

Hi Steve,

I'm wondering if your 'phone' column is a custom column, and if so if it has come from a Feature. If so, and you had activated (not installed) this Feature before doing the import, you would get this error. Essentially you should allow the deployment process to activate your custom Features for you on the destination.

Also see:-

- Stefan's Requirements for a successful content deployment
- my Recipe for successful use of the Content Deployment Wizard

Let me know if you can't get anywhere.

Cheers,

Chris.

Trevor said...

Chris,

Thanks for all the effort. I ran into your deployment wizard when I was at the end of my rope in setting up a publishing site with 9GB of source data. I couldn't have gotten the publishing site initially deployed without it. Great jobs on the logs and GUID retention!!

I currently use it to diagnose content deployment errors that have vague failure messages. Wait, that's all content deployment errors :)

Trevor Jones

Anonymous said...

Hi,

I have been following the codeplex link, but it says "project is not yet published". How may I get it.

Thanks,
Warfi

Chris O'Brien said...

@Warfi,

Right, have looked into this and it seems the project has been unpublished by the Codeplex administrators because I haven't published the source code - apparently this is a requirement for Codeplex projects.

Whilst I get this resolved, please leave another comment with your e-mail address (I won't publish the comment!), and I'll send the stuff by e-mail. Same for anyone else who needs to get the Wizard in the meantime.

Apologies for the temporary inconvenience!

Chris.

Anonymous said...

Hi Chris,
Great tool. I've read all the blogs you have posted on this.
Do all features that are to be installed on the destination site, have to be in a deactivated state before deployment of content?
Most of the features developed in our company automatically activate when deployed. Would just deactivating them after install be ok before deploying content?
Looking forward to see you at the SUGUK on the 16th Oct.

Chris O'Brien said...

Hi Paul,

Yes, generally the guideline is to have required Features installed but not activated. However, when you think about it this can't be the case every time, otherwise we'd have to deactivate all our Features every time we wanted to do a deployment. Fortunately this isn't the case.

This is what I've worked out:

- Features which create lists or libraries are the ones which really do need to be installed but not activated - and this is for the first deployment of the list only (using Content Deployment or the Wizard)
- If you have which Features which auto-activate and do create lists or libraries, you may need to deactivate them and delete the lists/libraries which were provisioned before doing the first Wizard deployment. I'm not 100% on this so you might need to do a couple of tests - note it also depends on whether you're attempting to 'retain object IDs' or not (I generally do).

Hope that's of some use. Let me know how you get on at the user group!

Chris.