- Need to change the name of the Site Collection
- Need the URL to update with the name change
- No renaming option in Central Administration
- No renaming option in Manage Content and Structure
This isn't a single step process, but overall the process is pretty simple.
Prerequisites:
- Access to Central Administration
- Destination Path to Export the Site Collection as a .CMP File
- Name of Current Site Collection
- Name of New Site Collection
- Users who decide on a site name and then change their mind
The reason why we have to Export the Site Collection is so there won't be duplicate GUID's for what is actually a different Site Collections. You can't have 2 Site Collections with the same ID's in 1 Farm, as it would *literally rip a hole in the space/time continuum.
The Solution:
We'll be Exporting the current Site Collection to a File and then restoring it under a different name.
- Open Central Administration
- Select Backup and Restore
- Granular Backup > Export a Site or List
- Under Site Collection, Select the Site Collection to Export
- No reason to select site or list since we're exporting the entire site collection
- example http://intranet/sites/old_and_broke
- File Location > Path + File name for the Export: C:\exports\old_and_broke.cmp
- Select Export Full Security, but it can be deceiving and the Full Security doesn't come over well
- I recommend you verify the security after restoring, as this process will create new SharePoint Site groups
- Export All Versions
- Click Start Export
Renaming and Restoring the Site Collection using PowerShell
**There is an extremely complicated PowerShell command that we'll use to restore the site collection and rename it at the same time.
Restore-SPSite http://intranet/sites/new_hotness -Path C:\exports\old_and_broke.cmp -Force
-DatabaseServer IntranetDBServer -DatabaseName WSS_Content_Intranet
This line of PowerShell will restore the site collection under a new URL and to a specific Content Database.
Option #2 for renaming and restoring
There is also a 2nd option for restoring, if you already have an existing site collection you want to overwrite.
Prerequisite: The new site site collection with the new name must already exist.
Import-SPWeb http://intranet/sites/new_hotness –Path C:\exports\old_and_broke.cmp
This wonderful line restores the site collection over top of an existing site collection.
Option #3 for renaming and restoring
You can create a site collection, based on a site template with PowerShell and then restore overtop of that.
New-SPWeb http://intranet/sites/new_hotness -Template "STS#0"
Import-SPWeb http://intranet/sites/new_hotness –Path C:\exports\old_and_broke.cmp
Enjoy!
**Not actually complicated or extreme.
No comments:
Post a Comment