- Create a new content database in the MOSS 2007 farm. This was accomplished through SharePoint 3.0 central Administration. It's a pretty straight-forward process. I did this so I had a clean database to move that only had the data I needed.
- Create a new site collection in the new content database within MOSS 2007. Again, a straight-forward process using SharePoint 3.0 Central Administration. I mimicked the managed path that I wanted to use in the SharePoint 2010 environment.
- Open Command Prompt and change directory to %COMMONPROGRAMFILES%\Microsoft shared\web server extensions\12\bin, then run the following STSADM command to export the content of the site:
stsadm -o export -url <Old Site URL> -filename <export file name.cab> -includeusersecurity -versions 4 (to include all versions)More information about stsadm export/import can be found HERE
It's important to make sure you have enough available disk space for the backup files. You can verify the size of the site by opening it up in SharePoint Designer (2007 in this case) and clicking Site > Reports > Site SummaryIf you get an error during the export process (Error: Unknown compression type in a cabinet folder), it means you have insufficient disk space available. Please keep in mind that it will write temp files to the C drive, so make sure you have at least 2-3x the total storage needed, or save the back up files to a different drive to split off the load.
- Once the content has been exported, use the following STSADM command to import the content of the site to the new site collection on the new content database:
stsadm -o import -url <New Site URL> -filename <export file name.cab> -includeusersecurity
At this point, we have isolated just the content we need into a new MOSS 2007 content database, which will make the move much easier than it was before we started. If you run into any problems with the above steps, make sure the account you are using has the necessary permissions.
Before we create a backup of the 2007 content database and move it to the new 2010 farm, we will need to run the Pre Upgrade Check and fix any issues reported before moving on to the next step:
stsadm -o preupgradecheck
stsadm -o preupgradecheck
Once the database is ready, it's time to create a backup the database and copy it over to the new SQL instance:
- Open Microsoft SQL Server Management Studio for the 2007 instance. Right-click on the content database and select Tasks > Backup...
- Enter the Backup Name, select Destination, and click OK to start.
- Copy this backup file to the SharePoint 2010 SQL server.
After the database is in the new environment, restore, test and mount the database to SharePoint 2010:
- Restore the SharePoint 2007 backup to SharePoint 2010 SQL Server. Open Microsoft SQL Server Management Studio. Right-click on Databases and select Restore Database...
- Enter the new database name, making sure that you don't overwrite the original content database. Select the Source and click OK to start. If the database is showing "offline", be sure to bring it online before moving to the next step.
- Next, test the database against the existing SharePoint 2010 web application. If there are any errors, make sure to correct them before mounting the SP2007 content database.
Test-SPContentDatabase -Name <DatabaseName> -WebApplication <URL>
- If there are no errors (or the errors have been fixed), use the Mount-SPContentDatabase cmdlet. This cmdlet also upgrades the SP2007 content to SP2010.
Mount-SPContentDatabase <ContentDb> -WebApplication http://SiteNameIf the database was moved from a different environment, you may need to change the site collection administrators in order to see the Site Settings menu
- Verifiy the data is moved properly and perform visual upgrade.