Restore a Web application (Search Server 2010)
Применимо к: Search Server 2010
Последнее изменение раздела: 2010-04-13
When you restore a Web application, you also restore the Internet Information Services (IIS) settings and all content databases that are associated with the Web application. You can only restore one Web application at a time by using this procedure. However, you can simultaneously restore all the Web applications in the farm by restoring the complete farm. For more information, see Restore a farm (Search Server 2010) .
Примечание
You cannot use SQL Server tools to restore a Web application.
Procedures in this topic:
Use Windows PowerShell to restore a Web application
Use Central Administration to restore a Web application
Use Windows PowerShell to restore a Web application
You can use Windows PowerShell to restore a Web application manually or as part of a script that can be run at scheduled intervals.
To restore a Web application by using Windows PowerShell
Verify that you meet the following minimum requirements: См. статью Add-SPShellAdmin. You must also have read permissions to the backup folder and be a member of the following fixed database roles: db_owner on the farm configuration database, and dbcreator on the content databases that are being restored.
In the SharePoint 2010 Management Shell, at the Windows PowerShell command prompt, type the following command:
Restore-SPFarm -Directory <BackupFolder> -RestoreMethod <Option> -Item <WebApplicationName> -BackupId <GUID> -Verbose
Where:
<BackupFolder> is the path of the backup that you want to use.
<Option> is one of the following:
Overwrite, to restore to the same farm.
New, to restore to a different farm such as a recovery farm.
<WebApplicationName> is the name of the Web application.
<GUID> is the identity of the specific backup that you want to use. You can view the backups for the farm by typing the following:
Get-SPBackupHistory -Directory <BackupFolder> -ShowBackup
. If you do not use the BackupID parameter, the most recent backup will be used. You cannot restore a Web application by using a configuration-only backup.
To view the progress of the operation, use the Verbose parameter. For more information, see Restore-SPFarm.
If you do not use the Verbose parameter, the Command Prompt window displays no message if the operation succeeds. If the job does not finish successfully, the Command Prompt window displays an error message such as the following:
Restore -SPFarm: The job failed. For more information, see the error log that is located in the backup folder. At line: <line> char:<column>. + <cmdlet> <<<< <location of error>
If there are errors or warnings, or if the restore does not finish successfully, review the Sprestore.log file in the backup folder.
Use Central Administration to restore a Web application
You can use Central Administration to restore a Web application.
To restore a Web application by using Central Administration
Verify that the user account performing this procedure is a member of the Farm Administrators group. Additionally, verify that the Windows SharePoint Services Timer V4 service and the Farm Database Access account have Full Control permissions on the backup folder.
In Central Administration, on the Home page, in the Backup and Restore section, click Restore from a backup.
On the Restore from Backup — Step 1 of 3: Select Backup to Restore page, from the list of backups, select the backup job that contains the farm or Web application backup, and then click Next. You can view more details about each backup by clicking the (+) next to the backup.
Примечание
If the correct backup job does not appear, in the Current Directory Location text box, type the Universal Naming Convention (UNC) path of the correct backup folder, and then click Refresh.
You cannot use a configuration-only backup to restore the Web application.On the Restore from Backup — Step 2 of 3: Select Component to Restore page, select the check box that is next to the Web application, and then click Next.
On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Component section, make sure that Farm\<Web application> appears in the Restore the following content list.
In the Restore Only Configuration Settings section, make sure that the Restore content and configuration settings option is selected.
In the Restore Options section, select the Type of Restore option. Use the Same configuration setting unless you are migrating the Web application or using a recovery farm. If you select this option, a dialog box will appear that asks you to confirm the operation. Click OK.
Примечание
If the Restore Only Configuration Settings section does not appear, the backup that you selected is a configuration-only backup. You must select another backup.
Примечание
If you are migrating the Web application or restoring the farm to a recovery farm, select the New configuration option.
Click Start Restore.
You can view the general status of all recovery jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current recovery job in the lower part of the page in the Restore section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.
If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Sprestore.log file at the UNC path that you specified.