SharePoint 2013 Notes: Moving a wildcard inclusion path site collection to root
Introduction
This posting consolidates notes and references on how to move a target site collection from its wildcard inclusion path to the root of that path. This effort is part of a larger effort to migrate a web application from wildcard inclusion topology to an explicit inclusion topology.
The procedure begins by first performing SQL Server backups of all content databases. Next, a site collection backup is performed using the SharePoint cmdlet, Backup-SPSite. Once the target site collection has been backed up, the next task is to perform a SharePoint detach of all content databases of the target web application. You may wish to follow up this with a SQL Server detach as well and then archiving of these databases. Once all of the databases have been removed from the web application, the next step involves creating a new blank content database.
Procedure
Perform SQL Server backups of target web application content databases. Use SQL Server Management Studio.
Perform a site collection backup of the target site collection. Use Backup-SPSite. Example:
Backup-SPSite "http://dev/sites/test1/" -Path E:\test1.bak -UseSqlSnapshot
Perform SharePoint detach of target web application content databases. Use Central Administration (CA > Application Management > Databases > Manage content database). Or use Dismount-SPContentDatabase. Example:
Dismount-SPContentDatabase "WSS_Content_OLD"
Create new content database at target web application. Use Central Administration (CA > Application Management > Databases > Manage content database). Or use New-SPContentDatabase. Example:
New-SPContentDatabase -Name "WSS_Content_NEW" -WebApplication "http://dev/"
Execute Restore-SPSite against the site collection backup. Example:
Restore-SPSite "http://dev/" -Path E:\test1.bak -Force -DatabaseServer "DEV" -DatabaseName "WSS_Content_NEW"
Execute IISRESET
Remove wildcard inclusion managed paths from web application. Use Central Administration (CA > Application Management > Web Applications > Manage web applications > [select the target web application] > Manage > Managed Paths.
Update site collection navigation. For example, if Managed Navigation is being used, will need to update navigation term set and then re-assigned navigation to that term set.
Fix any custom master page JS or CSS references. CSS reference URLs include the entire path. These will need to be updated
References
- Backup-SPSite
- Dismount-SPContentDatabase
- Attach or detach content databases in SharePoint 2013
- New-SPContentDatabase
- Restore-SPSite
Notes
TBD