Restore a site collection (Search Server 2010)
Применимо к: Search Server 2010
Последнее изменение раздела: 2011-08-08
You can use only Windows PowerShell to restore a site collection.
Важно!
The SharePoint 2010 Service Pack 1 (SP1) upgrade process alters the schema of all content databases. Because of these changes, you might need to take additional steps to restore a backup that you made before the farm was upgraded to SP1 to the farm after it is upgraded to SP1. For more information about doing this, see Восстановление резервных копий без пакета обновления 1 (SP1) в ферме с этим пакетом (SharePoint Server 2010).
Use Windows PowerShell to restore a site collection
You can use Windows PowerShell to restore a site collection manually or as part of a script that can be run at scheduled intervals.
To restore a site collection by using Windows PowerShell
Verify that you meet the following minimum requirements: См. статью Add-SPShellAdmin. Additionally, verify that the user account performing this procedure has read permissions to the backup folder and is a member of the db_owner fixed database role on both the farm configuration database and the content database where the site collection is being restored.
In the SharePoint 2010 Management Shell, at the Windows PowerShell command prompt, type the following command:
Restore-SPSite -Identity <SiteCollectionURL> -Path <BackupFile> -DatabaseServer <DatabaseServerName> -DatabaseName <ContentDatabaseName> -HostHeader <HostHeader> -Force -GradualDelete -Verbose
Where:
<SiteCollectionURL> is the URL of the site collection that you want to restore.
<BackupFile> is the path of the backup that you want to use.
<DatabaseServerName> and <ContentDatabaseName> are the specific database server and content database to which you want to restore the site collection. If you do not specify a content database, the site collection will be restored to a content database chosen by Microsoft Search Server 2010.
<HostHeader> is the URL of the Web application that will hold the host-named site collection.
This command uses the Force parameter to overwrite an existing site collection and uses the GradualDelete parameter for better performance during the restore process, which is recommended if the site collection that you are restoring is 1 gigabyte or larger. When this parameter is used, the site collection that is overwritten is marked as deleted, which immediately prevents any additional access to its content. The data in the marked site collection is then deleted gradually over time by a timer job instead of all at the same time, which reduces the impact on server performance.
For more information, see Restore-SPSite.
Примечание
Для выполнения административных задач из командной строки мы рекомендуем использовать Windows PowerShell. Программа командной строки Stsadm является устаревшей, однако она добавлена для совместимости с предыдущими версиями продукта.