Friday, July 10, 2009

Import and Export using STSADM

There is a lot of information on the Web for using the import and export function of stsadm. I must say I have picked up two things that I can't find on the Web. Maybe it will be useful for you to.

Like all the other blogs/site say, make sure the patch levels are exactly the same between the origin server and destination server.

When migrating content that uses one of the 40 free templates from Microsoft, then your manifest.xml will have some funny stuff in it.

Error when trying to import:
FatalError: The content type name cannot contain: \ / : * ? " # % < > { } ~ &, two consecutive periods (..), or special characters such as a tab.

This is due to the in the content type name. To resolve it is simple, but a lot of work.

Open the manifest.xml (from your export folder, either use nofilecompression, or open the cab and extract it. Problem is, you will have to build the cab file after editing the manifest.xml)

In the 12 hive (12\Resources), open the file tsa..resx. Search in the file for text: transaction,
<data name="transaction" space="preserve">
Now we have the value with which we will replace in the manifest.xml
Name="$Resources:tsa,transaction;" will change to

And that is it. There will however be a lot of $Resources: tags. I made a script that replaces all the $Resources: with the correct value.

The other problem is, we have a tool called Quest. Now Quest has a lot of event handlers. This is to audit and track actions on SharePoint. So, when you export a site on a SharePoint Server that has Quest installed, then you export the Event Handlers as well. As in:

<eventreceiver id="6e590fc1-4538-407f-8443-faedc5a5c222" class="Quest.ITSP.Monitor.Solution.EventReceivers.CEventReceiver4Item" name="Quest.ITSP.Monitor.Solution.EventReceivers.CEventReceiver4Item::ItemAdding" webid="0faba338-278d-4cad-8f1a-93a9d64d3d1e" hostid="0faba338-278d-4cad-8f1a-93a9d64d3d1e" hosttype="Web" type="ItemAdding" sequencenumber="10064" assembly="Quest.ITSP.Monitor.Solution, Version=, Culture=neutral, PublicKeyToken=39f564e586a37f3c" data="" filter="" credential="0">
<eventreceiver id="3b84a287-8173-436e-bd3d-148fff8b987d">

Just delete the Quest Event Receivers from the manifest.xml.

Edit: 24/07/2009: If the target server does not have Quest installed, then you should remove all references to Quest. All the EventReceivers that reference Quest, as well as:

<SPObject Id="f90f3a29-6297-40a2-bc83-c3f23be994cb" ObjectType="SPFeature" ParentId="" ParentWebId="597c735e-0060-4e20-83a9-1447040f9fce">
<Feature Id="f90f3a29-6297-40a2-bc83-c3f23be994cb" FeatureDefinitionName="Quest.ITSP.Monitor.Web" WebId="597c735e-0060-4e20-83a9-1447040f9fce" />
in the manifest file.
AND in the Requirements.xml:

<Requirement Type="FeatureDefinition" Id="f90f3a29-6297-40a2-bc83-c3f23be994cb" Name="Quest.ITSP.Monitor.Web" />

There you go!


  1. Question - you say to delete the Quest information from the Manifest.xml file, which one? We have a upwards of 60 files with that name. Also, is this on the host or the destination? Both host and destination had Quest, but it has been removed from the destination server, and I still get the Quest error you mention. Any help would be apprecated.

  2. What did you export to have 60 files with that name?

    I export one site collection or sub site at a time. Specifying -nofilecompression, only one manifest.xml is created in the directory specified with the -filename parameter.

    In the features.xml, it specifies that the Quest Features needs to be on the destination server. You have to remove all references to Quest features in the features.xml as well.