Partilhar via


Restore a service application (Search Server 2010)

 

Tópico modificado em: 2016-12-01

There are situations in which you might have to restore a specific service application instead of restoring the complete farm. Some service applications — for example, the Business Data Connectivity service application the Search service application — provide data to other services and sites. As a result, users might experience some service interruption until the recovery process is finished.

For information about how to simultaneously restore all the service applications in a farm, see Restore a farm (Search Server 2010).

Importante

You cannot back up from one version of Microsoft Search Server and restore to another version of Search Server.

Procedures in this topic:

  • Use Windows PowerShell to restore a service application

  • Use Central Administration to restore a service application

  • Use SQL Server tools to restore a service application

Use Windows PowerShell to restore a service application

You can use Windows PowerShell to restore a service application.

To restore a service application by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: Consulte Add-SPShellAdmin.

  2. In the SharePoint 2010 Management Shell, at the Windows PowerShell command prompt, type the following command:

    Restore-SPFarm -Directory <BackupFolder> -Item <ServiceApplicationName> -RecoveryMethod <Option> -BackupId <GUID> -Verbose
    

    Where:

    • <BackupFolder> is the path of the backup that you want to use.

    • <ServiceApplicationName> is the name of the service application that you want to restore. To display the names of service applications, type the following command: Backup-SPFarm -ShowTree.

    • <Option> is one of the following:

      • Overwrite, to restore a service application to the same farm.

      • New, to restore to a different farm such as a recovery farm.

    • <GUID> is the identity of the specific backup that you want to use. If you do not use the BackupId parameter, the most recent backup is used.

    Observação

    If you are not logged on as the Farm account, you are prompted for the Farm account’s credentials.

    To view the progress of the operation, use the Verbose parameter.

    You cannot restore a service application from a configuration-only backup.

    For more information, see Restore-SPFarm.

  3. 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 operation failed. At line: <line> char:<column>. + Recover-SPFarm <<<< <Error Message>

  4. If there are errors or warnings, or if the operation does not finish successfully, review the Sprestore.log file in the backup folder.

Use Central Administration to restore a service application

Use the following procedure to restore a service application by using the SharePoint Central Administration Web site.

To restore a service application by using Central Administration

  1. Verify that the user account performing this procedure is a member of the Farm Administrators group.

  2. In Central Administration, on the Home page, in the Backup and Restore section, click Restore from a backup.

  3. On the Restore from Backup — Step 1 of 3: Select Backup to Restore page, select the backup job that contains the service application backup, or a farm-level backup, from the list of backups, and then click Next. You can view more details about each backup by clicking the (+) next to the backup.

    Observação

    If the correct backup job does not appear, in the Backup 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 farm.

  4. On the Restore from Backup — Step 2 of 3: Select Component to Restore page, select the check box that is next to the service application, and then click Next.

  5. On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Component section, make sure that Farm\<Service 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 service application. If you select this option, a dialog box will appear that asks you to confirm the operation. Click OK.

    Observação

    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.

    Click Start Restore.

  6. 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 a 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 in step 2.

Use SQL Server tools to restore a service application

You cannot restore the complete service application by using SQL Server tools. However, you can use SQL Server tools to restore the databases that are associated with the service application. To restore the complete service application, use either Windows PowerShell or Central Administration.

To restore a service application by using SQL Server tools

  1. Verify that the user account you are using to restore the databases is a member of the SQL Server sysadmin fixed server role on the database server where each database is stored.

  2. Open SQL Server Management Studio and connect to the database server.

  3. In Object Explorer, expand Databases.

  4. Right-click the database that you want to restore, point to Tasks, and then click Restore.

  5. In the Restore Database dialog box, select the kind of recovery that you want to perform from the Restore type list.

    For more information about which recovery type to use, see Overview of Recovery Models (https://go.microsoft.com/fwlink/p/?LinkId=114396) in SQL Server 2005 Books Online.

  6. In the Restore component area, click Database.

  7. Either use the default name provided or specify a name for the recovery set in the Name text box.

  8. Specify the expiration date for the recovery set. The date determines how long, or when, the recovery set can be overwritten by any later recoveries that have the same name. By default, the recovery set is set to never expire (0 days).

  9. In the Destination area, specify where you want to store the recovery.

  10. Click OK to restore the database.

  11. Repeat steps 2-10 for each database that is associated with the service application.