Restore a service application in SharePoint 2010 Products

 

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 and the User Profile Service service application — provide data to other services and sites. As a result, users might experience some service interruption until the recovery process is complete.

You can also at the same time restore all the service applications in a farm by using Windows PowerShell or Central Administration.

Important

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

Note

SharePoint Server 2010 backs up the Business Data Connectivity service metadata store, which includes external content types, external systems, and Business Data Catalog models. For more information, see Business Data Connectivity service administration overview (SharePoint Server 2010). Note that this does not back up the external data sources. To protect the data, the external data sources must be backed up.
If you restore the service application or the farm and then restore the data source to a different location, you must configure the location information in the external content type definition. If you do not, the Business Data Connectivity service might be unable to locate the data source.

Note

SharePoint Server 2010 restores remote Binary Large Object (BLOB) stores but only if you are using the FILESTREAM provider to put data in remote BLOB stores.
If you are using another provider, you must manually restore remote BLOB stores.

Procedures in this article:

  • To restore a service application by using Windows PowerShell

  • To restore a service application by using Central Administration

  • To restore the databases for a service application by using SQL Server tools

    Note

    You cannot restore the complete service application by using SQL Server tools. However, you can restore the databases that are associated with the service application.

Use Windows PowerShell to restore a service application in SharePoint

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: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Restore-SPFarm -Directory <BackupFolder> -Item "<ServiceApplicationName>" -RestoreMethod Overwrite [-BackupId <GUID>] [-Verbose]
    

    Where:

    • <BackupFolder> is the path for the backup folder where the service application was backed up.

    • <ServiceApplicationName> is the name the service application.

    • <GUID> is the ID of the backup to use.

    To specify which backup to use, use the BackupId parameter. You can view the backups for the farm by typing the following: Get-SPBackupHistory -Directory <BackupFolder> -ShowBackup. If you do not specify the BackupId, the most recent backup will be used. You cannot restore a service application from a configuration-only backup.

    To restore all the service applications, at the Windows PowerShell command prompt, type the following command:

    Restore-SPFarm -Directory <BackupFolder> -Item "Farm\Shared Service Applications" -RestoreMethod Overwrite [-BackupId <GUID>] [-Verbose]
    

    Where:

    • <BackupFolder> is the path for the backup folder where the service application was backed up.

    • <GUID> is the ID of the backup to use.

For more information, see Restore-SPFarm.

Note

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Use Central Administration to restore a service application in SharePoint

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 that is performing this procedure is a member of the Farm Administrators SharePoint 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.

    Note

    If the correct backup job does not appear, in the Backup Directory Location text box, type the 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, expand Shared Services Applications, select the check box that is next to the service application, and then click Next. To restore all the service applications, select the Shared Services Applications node.

  5. On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Component section, make sure that Farm\Shared Services Applications\<Service application> appears in the Restore the following component list.

    In the Restore Options section, under Type of restore, select the Same configuration option. A dialog box will appear that asks you to confirm the operation. Click OK.

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

Use SQL Server tools to restore the databases for a service application in SharePoint

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 the databases for a service application by using SQL Server tools

  1. Verify that the user account that 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, point to Restore, and then click Database.

  5. In the Restore Database dialog box, on the General page, select the database to restore to from the To database drop-down list.

  6. Select the restore source from the From database drop-down list.

  7. In the Select the backup sets to restore section area, select the check box next to the database.

  8. On the Options tab, select the recovery state from the Recover state section.

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

  9. Click OK to restore the database.

  10. Repeat steps 1-9 for each database that is associated with the service application.

See Also

Other Resources

Resource Center: Business Continuity Management for SharePoint Server 2010