Compartilhar via


Working with a Content Migration Package

Applies to: SharePoint Foundation 2010

The content migration package consists of a set of data files that contain all of the content included in an export operation plus a manifest file that describes the structure of the data.

Following is a brief description of the files that are included in a content migration package.

ExportSettings.xml

The ExportSettings.xml file is used to verify the logic of the export and ensure that what is expected in the export is included in the package.

<ExportSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema" SiteUrl="http://server1/" 
   FileLocation="c:\" BaseFileName="cmfile.cmp" IncludeSecurity="None" 
   IncludeVersions="LastMajor" ExportMethod="ExportAll" 
   ExportChangesSinceDate="0001-01-01T00:00:00"
   xmlns="urn:deployment-exportsettings-schema">
   <ExportObjects />
</ExportSettings>

Requirements.xml

The Requirements.xml file contains information that is used as a preliminary check before any import takes place. This XML file verifies information such as the following:

  • The language is installed at the destination location (in this case, English). If the language is not installed at the destination, the import will fail.

  • Templates are installed at the destination location (in this case, the English version of the template with the ID of "STS#1"). If the templates are not installed at the destination, the import will fail.

  • Feature definitions are installed at the destination location. If the feature definitions are not installed at the destination, the import will fail.

    Note

    After an import is complete, all features are activated.

  • Web Parts are in the Safe Controls list at the destination location. If this is the case, the import continues. If the Web Parts are not in the Safe Controls list, a warning is issued and the import continues (unless HaltOnWarning is set to true).

    Note

    The object model does not verify that the Web Part DLLs are installed at the destination location. This is the responsibility of the administrator.

<Requirements xmlns="urn:deployment-requirements-schema">
   <Requirement Type="Language" Id="1033" Name="English" /> 
   <Requirement Type="WebTemplate" Id="STS#1" Name="1033" Data="English" /> 
   <Requirement Type="WebPart" 
      Id="Microsoft.SharePoint.dll v2.0.50727" 
      Name="2242cce6-491a-657a-c8ee-b10a2a993eda" /> 
   <Requirement Type="FeatureDefinition" 
      Id="695b6570-a48b-4a8e-8ea5-26ea7fc1d162" 
      Name="ctypes" />
...

RootObjectMap.xml

The RootObjectMap.xml file defines the top-level object to import, that is, the object with no parent.

In the following example there is only a single, top-level object. However, because all dependencies are included in an export, and dependencies can be outside of the Web site that is being exported, there can be more than one top-level object.

<RootObjects xmlns="urn:deployment-rootobjectmap-schema">
   <RootObject Id="d78135df-74f0-44ff-86d9-44cb5583f3a1" 
   Type="Web" ParentId="00000000-0000-0000-0000-000000000000" 
   WebUrl="/" Url="/" IsDependency="false" /> 
</RootObjects>

SystemData.xml

The SystemData.xml file contains all the default objects that are installed on a server that is extended with SharePoint Foundation. This information is used primarily when the export/import operation is retaining GUIDs between the source and destination locations.

This file contains the schema version. If this does not match the version at the destination, the import fails.

<SystemData xmlns="urn:deployment-systemdata-schema">
<SchemaVersion Version="12.0.x.0" Build="12.0.0.xxxx" DatabaseVersion="xxxx" SiteVersion="0" /> 
<ManifestFiles>
<ManifestFile Name="Manifest.xml" /> 
</ManifestFiles>
<SystemObjects>
<SystemObject Id="d78135df-74f0-44ff-86d9-44cb5583f3a1" Type="Web" Url="/" /> 
<SystemObject Id="6b4bd918-76a0-4b7e-8e09-4a0356543e42" Type="Folder" Url="/" />
...

UserGroups.xml

The UserGroup.xml file contains all the user and group information from the source Web site. The following example does not include user and group information. To include user and group information, see the IncludeSecurity property.

<UserGroupMap xmlns="urn:deployment-usergroupmap-schema">
<Users>
<User Id="1" Name="Terry Adams" Login="DOMAIN\username" Email="someone@example.com" IsDomainGroup="False" IsSiteAdmin="True" SystemId="ABCDEFGHIJKLMNOPoQRWfnhXm1/yzIdwDMoDAD==" IsDeleted="false" /> 
</Users>
<Groups /> 
</UserGroupMap>

Manifest.xml

The Manifest.xml file is the primary file used by content migration. This file contains a collection of SPObject elements, which represent all of the exported content serialized into XML. Each SPObject element has an ObjectType attribute that indicates whether it is an SPWeb, SPFolder, SPFile, and so on.

Note

You can have multiple Manifest.xml files, and can break them into any number of smaller files.

The Manifest.xml file is based on a linear relationship of the objects—all objects are at the same level and there is no containership reflected in the file. The file requires that an parent of an object precedes the object in the Manifest.xml file. For example, the entry for the SPFile seen below must be preceded in the Manifest.xml file by its parent SPFolder.

Each SPFile object has a FileValue attribute, which refers to the DAT file containing the file contents. For example, in the following section of the Manifest.xml file you see an SPFile object with a FileValue="00000001.dat", indicating the location of this data associated with this file.

<SPObject Id="a9a407c3-b155-41cc-9ca1-483525072f70" 
 ObjectType="SPFile" ParentId="bb480411-a95c-49cc-857e-a229194b99d6" 
 ParentWebId="d78135df-74f0-44ff-86d9-44cb5583f3a1" ParentWebUrl="/" 
 Url="/_catalogs/lt/Forms/DispForm.aspx">
  <File Url="_catalogs/lt/Forms/DispForm.aspx" 
   Id="a9a407c3-b155-41cc-9ca1-483525072f70" 
   ParentWebId="d78135df-74f0-44ff-86d9-44cb5583f3a1" ParentWebUrl="/" 
   DirName="_catalogs/lt/Forms" Name="DispForm.aspx" 
   ListId="330e3721-3de2-474a-a4be-05a0831d6b4d" 
   ParentId="bb480411-a95c-49cc-857e-a229194b99d6" 
   ScopeId="e4252b2a-aa90-49f1-b7f5-f59714fd1efd" 
   TimeCreated="2006-03-13T22:58:21" TimeLastModified="2006-03-13T22:58:21" 
   Version="1.0" IsGhosted="true" SetupPath="pages\form.aspx" 
   SetupPathVersion="3" SetupPathUser="1" FileValue="00000001.dat" /> 
</SPObject>

See Also

Concepts

Content Migration Overview