Migrate Content in SharePoint 2010

In this tutorial I will describe  how to migrate  content between SharePoint site collections and even entire farms. Very often you need to clone, copy or just create testing environment out of your production sites so the good migration procedures are essential to every SharePoint administrator. The best tool for content migration is the export / import functionality.

For the purposes of this tutorial I  created a Site Collection from the Team Site template called IT Department, I then created the Technical Support site within the site collection. Now, to migrate the Technical Support site to a different site collection.

SharePoint Content Migration

IT Department site with Technical Support sub site visible in the top-menu.

Using stsadm, you can move the site using the export/import commands. Let’s try and export the site, using the stsadm tool. If you want, you can provide additional parameters, which can be very important to the
end result of the migration. To see the options type in “stsadm –o export” without additional parameters.

SharePoint Content Migration

stsadm –o export command parameters visible in the cmd.exe window

One of the mostly used oprions is includeusersecurity and versions. If you add the includeusersecurity parameter, the site will be exported with the security asssignments. If you don’t want to lose the security settings after the migration, you should add this parameter to the command. The versions parameter is used when you have versioning enabled and you don’t want the default content migration, which will export only the last major
version. Using the default settings you may find that some documents are missing from the migration, if they had no major versions at all (only minor versions, which is often the case). I would suggest to using the versions 2 parameter if you only want the latest document versions migrated. now we can revise the command and include security and the latest document version in the script:

stsadm –o export –url http://sp2010/techsupport -filename C:techsupportsite -includeusersecurity -versions 2

When this command is executed,  stsadm will start the logging to the cmd window and the log file in the exported file directory. If all the content is successfully exported, you will see the end result with no warnings or errors. If  encounter any warnings or errors, you can use the export log file to find and fix the issues before migrating  the site.

SharePoint Content Migration

End of the Export command with the successful report

Now, we will use the import command to restore the exported site on a different site collection. You can also use this file to import the site with content on different web applications, or even different farms, but then you will have to provide the same set of site collection features, web parts and security accounts.

In SharePoint 2010, you can import to a URL that doesn’t yet exist and you do not have to create the empty site just to import the content later.

In the command line, enter the below command:

stsadm –o import –url http://sps2010/sites/newsitecollection/techsupport –filename techsupportsite.cmp –includeusersecurity

After a successful import we can now check the migrated site to identify any issues. In this example there were no issues with the sample content but it this will obviously depend on the migrated content. If you are using third party SharePoint objects, you should deploy them on new application prior to using  the import command.

SharePoint Content Migration

Site migrated to new site collection using stsadm tool.

In SharePoint 2010 we can also use PowerShell for content migration.  With the new PowerShell capability, we can export/import a site, list or document library.
Continues…

Pages: 1 2




Array

No comments yet... Be the first to leave a reply!