Sunday 25 August 2013

Move List(s) from SharePoint 2010 to SharePoint 2013

Every time, I use complete database backup and restore process to move smaller pieces from SharePoint 2010 to SharePoint 2013.

I then googled and found very interesting and useful article at Absolute SharePoint Blog by Vlad Catrinescu

It is showing that how to move list(s) from SharePoint 2010 to 2013. It provided 3 ways:

1. Fast & Cheap — > Modify the .CMP file
This is the “dirty” method to make it work fast. What I mean by dirty, is that it isn’t supported by Microsoft officially since we will modify the .cmp file. Here is how to do it step by step.
  1. Export the list from SharePoint 2010 using either the Central Administration or PowerShell (Export-SPWeb). In the Central Administration, go to Backup and Restore > Export a site or list. Choose your list, and click Start Export
  1. Copy the exported list (.cmp file) to your desktop and change the extension to .cab. You can then extract it using a software like WinRar. You will then have those files:

  1. Open the SystemData.XML file with an editor like NotePad++ and change the version from 14.0.0.0 to 15.0.0.0 , and the build version from your 14.0.x.x to 15.0.x.x (depending on the build you have on both your farms). Here is a screenshot with before and after.
  2. Now we have to repackage it as a .cab file. I used a software called CabPack. Select your Source and Destination. Change the CabinetNameTemplate if you want, and click on OK.
  1. Change the extension from .cab to .cmp
  2. Copy the .cmp file back on the network share or directly on the SharePoint 2013 Server.
  3. Open SharePoint 2013 Management Shell as an administrator. Run this command by changing the parameters of course! Import-SPWeb -Identity http://teamsite.vlad.local/ -Path \\sp2010-itest\Exports\MyCusttomList.cmp -Verbose
  4. Open up your SharePoint Site and your list should be thereJ.

2.Fast & Clean

The Fast and proper way to move a list is moving it with a third party tool. The advantage with the third party tools is that they are very simple, and they work well. The Downside, of course is that they are not freeJ. However, I am sure that if you only want to move a list, you can simply download a trial and get the work done. Here is the one I heard the most positive comments about.
  1. ShareGate >> They offer a 15 day free Trial.

3. Clean & Cheap

If you don’t want to buy a third party solution, the other “best practice” solution would be to create a new temporary web application, upgrade your content DB to SharePoint 2013, and then export the list. However, if you have a lot of customizations and development done on the site collection, this might really get messy.

  1. Backup the Content Database of the Site Collection in which the list is. (SharePoint 2010)
  2. Create a Temporary Web Application in the SharePoint 2013 Farm.
  3. Run SharePoint 2013 Management Shell as an administrator, and run the following command to dismount the content database:
    Get-SPContentDatabase -WebApplication http://sitename | Dismount-SPContentDatabase
  4. Restore the Backup you took in Step 1, on the SQL Instance hosting your SharePoint 2013 Farm. Make sure you give the farm account db_owner permissions on the database.
  5. In the SharePoint 2013 Management Shell, run the following command.
    Mount-SPContentDatabase MyDatabase -WebApplication http://sitename
  6. Navigate to the Site Collection, and if you didn’t have too many development and custom things done, it should open no problem. Make sure the list you want to export is ok.
  7. Go in the Central Administration, go to Backup and Restore > Export a site or list. Choose your list, and click Start Export
  8. Open SharePoint 2013 Management Shell as an administrator. Run this command by changing the parameters of course! Import-SPWeb -Identity http://teamsite.vlad.local/ -Path\\sp2010itest\Exports\MyCusttomList.cmp -Verbose
  9. Open up your SharePoint Site and your list should be there

    Important Information! If you used Site Columns in your list, by using method 1 or 3, your columns will be imported as list columns. If you still want to use Site Columns, you will have to migrate them as well, in order to keep the same GUID. I found this script by Phil Childs really interesting, and it worked with my test list.http://get-spscripts.com/2011/01/export-and-importcreate-site-columns-in.html
    Those are three ways to get a list from SharePoint 2010 to SharePoint 2013. You choose which one fits you best!
Note:- Please note that this blog post is replica of "Absolute SharePoint Blog by Vlad Catrinescu" blog post.
I have taken permission to post this on my blog for others as well as for myself.


No comments :

Post a Comment