Convert a SharePoint 2013 site collection from path-based naming to host-based naming

Source: Internet
Author: User

Because you didn't know much about SharePoint at first, you didn't know a lot about path-based and command-based site collections, and all of them were created as path-based when they started creating site collections. Then need to use the authentication time, there are a lot of problems, so seriously learning some host command-based site collection method, more detailed content can refer to here http://technet.microsoft.com/zh-CN/library/cc424952 %28v=office.15%29.aspx.

But the previously created content does not want to recreate the new, so I want to upgrade him. Fortunately, sharepoint2013 has a very convenient way of conversion, only need two commands.

The backup-spsiterestore-spsite of the two commands are as follows:

Backup-spsite

Backup-spsite-identity ' http://portalOld.contoso.com '-path ' C:\Backup\portalContoso.bak '-force-usesqlsnapshot

Where: 1, ' http://portalOld.contoso.com ' represents the path of the original site collection created based on the path.

2. ' C:\Backup\portalContoso.bak ' indicates to which location the site collection will be backed up.

3. Force indicates that the existing backup file is overwritten (if the backup file already exists).

4. Usesqlsnapshot indicates that the SQL database snapshot will be created when the backup starts, and all site collection data will be retrieved directly from the database snapshot. When the backup is complete, the snapshot is automatically deleted. The usesqlsnapshot parameter is recommended if the database server that hosts the content database supports database snapshots, such as SQL Server Enterprise Edition and SQL Server Developer Edition. This is because it ensures that a valid backup is available while allowing users to read and write to the site collection during the backup. After you specify the usesqlsnapshot parameter, you do not have to specify the nositelock parameter.


Restore-spsite
Restore-spsite-identity ' http://portal.contoso.com '-path ' c:\Backup\portalContoso.bak '-databasename ' Portal_ Content '-force-hostheaderwebapplication ' http://<servername> '-confirm: $false

Where: 1, ' http://portal.contoso.com ' represents the path of the site collection that is created based on the host.

2. ' C:\Backup\portalContoso.bak ' indicates the location where the original site collection was backed up using the Backup-spsite command.

3. DatabaseName indicates that the SQL Server content database that will store the site collection data is specified. If you do not specify a content database, you will use a content database that has the largest capacity for unused site collections and whose database state is ready. The value you type must be a valid database name in the form SQLDB1.

4. Force indicates that this restore will overwrite the existing site collection at the URL location.

5. hostheaderwebapplication represents a valid URL that is assigned to a WEB application using alternate access mappings, such as http://server_name to restore the site collection to a named host site collection instead of a path-based site collection. When the hostheaderwebapplication parameter is present, the value of theIdentity parameter is the URL of the named host's site collection,hostheaderwebapplication The value of the parameter is the URL of the Web application that will host the named host's site collection.


--------------------------------------------------------

If you have any problems to communicate, please pay attention to



Convert a SharePoint 2013 site collection from path-based naming to host-based naming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.