Restore a farm (Search Server 2010)

Search Server

Applies to: Search Server 2010

Topic Last Modified: 2011-08-05

Farm-level recovery is usually performed only after a failure that involves the complete farm, or where partial recovery of part of the farm is not possible. If you only have to restore part of the farm, a specific database, a service application, a list, or document library, or a specific document, use another recovery method.

Farm recovery is usually performed for any of the following reasons:

  • Restoring a farm after a fire, disaster, equipment failure, or other data-loss event.

  • Restoring farm configuration settings and data to a specific previous time and date.

  • Moving a Microsoft Search Server 2010 deployment from one farm to another farm.

Procedures in this task:

Consider the following information before you restore a farm:

  • If you are using a recovery farm, it must have the same topology as the source farm.

  • You cannot restore a multiple-server farm to a single-server recovery farm or a single-server farm to a multiple-server recovery farm.

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

  • A recovery farm is not intended to be a live farm. It is a farm that is only used to restore data. The recovery farm does not have to have the same hardware as the primary farm; we recommend that you use a stand-alone installation or a virtual farm.

You can use Windows PowerShell to restore a farm.

To restore a farm by using Windows PowerShell
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

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

    Restore-SPFarm -Directory <BackupFolder> -RestoreMethod Overwrite -BackupId <GUID>


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

    • <GUID> is the identity of the backup that you want to use. To specify which backup to use, use the BackupId parameter. To view the backups for the farm, type the following command: Get-SPBackupHistory -Directory <BackupFolder> -ShowBackup -Verbose. If you do not use the BackupId parameter, the most recent backup is used. You cannot use a configuration-only backup to restore content databases together with the configuration.

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

    This command restores to the same farm because it uses the Overwrite option. To restore to a different farm, such as a recovery farm, use the New option. To view the progress of the backup, use the Verbose parameter.

    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 operation 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>. + Restore-SPFarm <<<< <Error Message>

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

You can use Central Administration to restore a farm.

To restore a farm by using Central Administration
  1. Verify that the user account that is 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, from the list of backups, select the backup job that contains the farm 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 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 farm, and then click Next.

  5. On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Component section, ensure that Farm appears in the Restore the following component list.

    In the Restore Only Configuration Settings section, ensure 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 farm 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 farm or restoring the farm to a recovery farm, select the New configuration option.

    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 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.

Although you cannot restore the complete farm by using SQL Server tools, you can restore most of the farm databases. If you restore the databases by using SQL Server tools, you must restore the farm configuration by using Central Administration or Windows PowerShell. For more information about how to restore the farm’s configuration settings, see Restore or copy a farm configuration (Search Server 2010).

The search index is not stored in SQL Server. If you use SQL Server tools to back up and restore search, you must perform a full crawl after you restore the content database.

Before you restore Search Server 2010, we recommend that you configure a recovery farm for site and item recovery.

Restore the databases by following these steps:

  1. If possible, back up the live transaction log of the current database to protect any changes that were made after the last full backup.

  2. Restore the last full database backup.

  3. Restore the most recent differential database backup that occurred after the most recent full database backup.

  4. Restore all transaction log backups that occurred after the most recent full or differential database backup.

To restore a farm by using SQL Server tools
  1. Verify that the user account that is performing this procedure is a member of the sysadmin fixed server role.

  2. If the Windows SharePoint Services Timer service is running, stop the service and wait for several minutes for any currently running stored procedures to finish. Do not restart the service until after you restore all the databases that you have to restore.

  3. Start SQL Server Management Studio and connect to the database server.

  4. In Object Explorer, expand Databases.

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

    The database is automatically taken offline during the recovery operation and cannot be accessed by other processes.

  6. In the Restore Database dialog box, specify the destination and the source, and then select the backup set or sets that you want to restore.

    The default values for destination and source are appropriate for most recovery scenarios.

  7. In the Select a page pane, click Options.

  8. In the Restore options section, select only Overwrite the existing database. Unless your environment or policies require otherwise, do not select the other options in this section.

  9. In the Recovery state section:

    • If you have included all the transaction logs that you must restore, select RECOVER WITH RECOVERY.

    • If you must restore additional transaction logs, select RECOVER WITH NORECOVERY.

    • The third option, RECOVER WITH STANDBY is not used in this scenario.

      For more information about these recovery options, see Restore Database (Options Page) (
  10. Click OK to complete the recovery operation.

  11. Except for the configuration database, repeat steps 4 through 9 for each database that you are restoring.

  12. To restore the configuration settings, you must use the existing configuration database or manually create a new database and restore the configuration to that database. For more information about restoring the farm configuration, see Restore or copy a farm configuration (Search Server 2010).

  13. Start the Windows SharePoint Services Timer service.