Host Name Site collection migration from SP2013 to 2016

Frequent Visitor

We have SharePoint 2013 environment now we are planning to migrate to SharePoint 2016, we have some site has host name site collection. we are not able to migrate site using spsite backup, is there any way to migrate host name site collection from SharePoint 2013 to 2016

1 Reply

@SWAPNIL RUKE    I did this a long time ago as a freelance job going from SP2010 to SP2013.  I can't believe it, but I still have notes I wrote for customer- hopefully this sets you on the right path.  It's mostly PowerShell with one stsadm command- that is probably available in PowerShell.   Good luck!

Restoring a database from SP2010

- place a backup of the sql content database that you want to restore somewhere convenient

- In Central admin (App Mgmt > Content Databases), create a new content database for the appropriate web app (do this in central admin, if you do this in sql you will need to set permissions in SQL)

- After it is created, open it and check the box to remove the database.

- In SQL, detach the database, check the box to drop connections

- Attach the database, then do a restore.  When you are configuring the restore, the source is the 2010 database and the destination is the content database you just created.  In the restore dialog box, click Options on the left and select "Overwrite the existing database (with REPLACE) and start backup.  This should be successful.  


Adding the Content Database

(replace the everything in red with the correct information, If you have problems with URLs, you can put them between ' '.)

- Run SharePoint Management Shell as Admin, and run the following command

Mount-SPContentDatabase -Name <ContentDBName> -WebApplication http://webappurl:5100     Expect errors. It's probably ok.

- In central admin, verify the content database is there and shows a site collection

- To verify the site collection, run this PowerShell command

    Get-SPSite -Limit All -ContentDatabase <ContentDBName> | select url, @{label="Size";Expression={$}}

- Update the SPSiteURL.  Run these PowerShell commands in order:

     Get-SPSiteURL -Identity <SPSiteURL>

     stsadm -o renamesite -oldurl  <> -newurl <>

- Arrow up and run this commmand again to verify your changes took

    Get-SPSite -Limit All -ContentDatabase <ContentDBName> | select url, @{label="Size";Expression={$}}

Cross your fingers and check your site :)