Apr 12, 2013

Restoring a SharePoint 2010 content database to a different domain

Much has been said about how to backup and restore a content database to another domain, but I'd like to post my version here to avoid a few gotchas I've come across.


  1. Take original content database offline in Central Administration > Application Management > Manage Content Databases
  2. Connect to SQL Server and make a backup of the original content database.
  3. Put the original content database back online via Central Administration.
  4. Move the database backup file to the new SQL Server.
  5. Restore the database backup file to the new SQL Server via SQL Management Studio.  You can change the database name at this time if you'd like.
  6. In SQL Management Studio > Security > Logins, go to the Properties of the new farm account login (domain\sp_farm or similar) and in the User Assignment panel, give the farm account the "db_owner" role for the new database.
  7. Connect to the Central Administration for the new server farm and create a new web application.
  8. You may create a new site collection and content database if you'd like to check that the new web application is working before restoring the original content database.
  9. If the new web application has any content databases that have site collections in the same URL path as the original content database (usually /), you must go to Central Administration > Application Management > Manage Content Databases in the new farm and remove that database from the web application (not just take offline, but remove).  It's important to remove the old content databases before adding the new content database in order for SharePoint to properly detect the site collection entry points.
  10. Add the restored content database to the new web application.  DO NOT connect to the new web application yet via web or you'll risk a conflict in the user migration steps.
  11. Open the SharePoint PowerShell Administration Console as administrator.
  12. Execute "Get-SPUser -Web http://newWebapplicationUrl" to get a list of all logins for the new web application
  13.  For each login shown that has the "olddomain", execute "Move-SPUser -Identity "olddomain\olduser" -NewAlias "newdomain\newuser". 
  14. Connect to the new web application to validate the restored content.
  15. If a new content database was created with the new web application, you may delete it now via SQL Management Studio.  Be careful not to delete your restored content database.

No comments:

Post a Comment