Restore a User Profile Service service application in SharePoint Server 2013

Summary: Learn how to restore the User Profile Service service application in SharePoint Server 2013.

You can restore the User Profile Service service application by using the SharePoint Central Administration website, Windows PowerShell, or SQL Server tools. Which backup tool you use depends on what kind of environment you have deployed, what your backup schedule requires, and what service level agreements you have made with your organization.

This article describes how to restore the User Profile Service service application instead of restoring the complete farm.

Note:

Because SharePoint Server 2013 runs as websites in Internet Information Services (IIS), administrators and users depend on the accessibility features that browsers provide. SharePoint Server 2013 supports the accessibility features of supported browsers. For more information, see the following resources:

You can use Windows PowerShell to restore a User Profile service application.

To restore the User Profile service application by using Windows PowerShell

Verify that you have the following memberships:

securityadmin fixed server role on the SQL Server instance.

db_owner fixed database role on all databases that are to be updated.

Administrators group on the server on which you are running the Windows PowerShell cmdlets.

An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 Products cmdlets.

Note:

If you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about Windows PowerShell permissions, see Add-SPShellAdmin.

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.

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, 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 User Profile Service service application.

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 User Profile Service service 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\Shared Services Applications\<User Profile Service service application name> 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.

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.

You cannot restore the complete service application or service application proxy 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.

Important:

If you are restoring the User Profile database (by default, it is named User Profile Service_ProfileDB_<GUID>), you must also restore the Social database (by default, it is named User Profile Service_SocialDB_<GUID>). Failing to do this can cause inaccuracies in the User Profile data that might be difficult to detect and fix.

To restore the databases associated with the User Profile service application by using SQL Server tools

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.

In Central Administration, in the System Settings section, click Manage services on server.

On the Services on Server page, find User Profile Service. If the service is started, click Stop to stop the service.

Before you restore the User Profile Service service application databases, you must import the Microsoft Identity Integration Server (MIIS) encryption key that you exported before backing up the databases. You only have to do this one time for the restore process. To do this, on the server to which you are restoring the service application, type the following at the command prompt:

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

In the Restore Database dialog box, on the Options page, select the kind of recovery that you want to perform from the Recovery state list.

For more information about which recovery type to use, see Recovery Models (SQL Server) in SQL Server 2008 with SP1 and Cumulative Update 2 Books Online.

On the General page, in the Destination for restore section, select the database from the To database list.

In the Source for restore section, select the backup source from the From database list.

Alternatively, if you have moved the backup files to another computer, select the From device option. If the correct backup is not listed in the Select the backup sets to restore box, browse to the file by clicking the ellipsis button.

Select the backup to restore from the Select the backup sets to restore box, and then click OK.

Click OK to restore the database.

Repeat steps 5-11 for the following databases associated with the User Profile Service service application (the names that are listed are the default names):

User Profile Service_ProfileDB_<GUID>

User Profile Service_SocialDB_<GUID>

User Profile Service_SyncDB_<GUID>

In Central Administration, in the System Settings section, click Manage services on server.

On the Services on Server page, find User Profile Service. If the service is stopped, click Start to start the service.