In this life time of a SharePoint installation, we might need to move a site to new site collection.
Site to Site Collection upgrading is needed due to multiple reasons like:
- Size exceeding limit
- Need for taxonomy based site collection
- Metadata, Security, Scope aspects
Following are the actions involved:
- Export Site & Sub sites to a network folder
- Delete the existing site
- Create new content database
- Create new Site Collection
- Import folder content to new Site Collection
Please note that the Export & Import operations are time consuming.
How much time it will take?
The time depends mainly on the Size of your site. If the size is around 1 GB, in a standard server you can expect 1-2 hours of processing time.
Here we are going to move a site with url: http://corp/oldsite to new url: http://corp/newsite. Please note that all the associated sub sites will also be moved. The destination will be a new site collection inside a new content database.
Following is the script which performs the above actions. Please change the arguments accordingly. You can find the script along with the article attachment.
Execution & Verification
After executing the script, you can verify the new site collection for:
- Valid Home Page
- Site Collection Features
- User Permissions
- Quick Launch Links
- View All Site Content
Please note that for lists, the system columns like Created On, Modified by etc. are set to the current user & current time.
Please try to use a Network Folder for backup locations.
In this article we have explored a method of moving site to site collection. I hope the PowerShell script is the shortest path available other than Tools, if you have better ideas let know.