Team blog of MCS @ Middle East and Africa

This blog is created by Microsoft MEA HQ near shoring team, and it aims to share knowledge with the IT community.With its infrastructure and development sides,It brings to you the proven best practices and real world experiences from Subject Matter Experts
Follow Us On Twitter! Subscribe To Our Blog! Contact Us

Migrating to SharePoint Host Name Site Collections 3

Migrating to SharePoint Host Name Site Collections 3

  • Comments 1
  • Likes

In my previous 2 posts on Host Named Site Collections, I laid out the powershell scripts to create Host Name site collections as well as creating managed paths under them.

After that, these site collections can be handled using PowerShell scripts normally.

In case of needing to migrate path-based site collections to host-named site collections, you can simply backup the path-based site collection & restore it to the newly created host named site collection.

A sample script for such backup & restore operation is as follows:

 

$hostHeaderWebApp = "http://<WebAppName>:<WebAppPort>"

$firstHostNamedSiteCollection = “<URL of Host Name Site Collection>”

$OriginalSiteCollection = "<URL of Path Based Site Collection>"

$BackupPath = "c:\temp\TestSiteBackup.bak"

 

Backup-SPSite $OriginalSiteCollection -Path $BackupPath

Restore-SPSite -Identity $firstHostNamedSiteCollection -Path $BackupPath -HostHeader $hostHeaderWebApp -Force

Comments
  • Can I migrate site collection 200 GB in size using this powershell command?

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment