Restore a User Profile Service service application (SharePoint Server 2010)
Applies to: SharePoint Server 2010
This article describes how to restore the User Profile Service service application instead of restoring the complete farm. The User Profile Service service application provides 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 in SharePoint Server 2010.
Important
You cannot back up from one version of Microsoft SharePoint Server and restore to another version of SharePoint Server.
Procedures in this article:
To restore the User Profile Service service application by using Windows PowerShell
To restore the User Profile Service service application by using Central Administration
To restore the databases associated with the User Profile Service service application by using SQL Server tools
Use Windows PowerShell to restore the User Profile Service service application in SharePoint
You can use Windows PowerShell to restore a service application.
To restore the User Profile Service service application by using Windows PowerShell
Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
On the Start menu, click All Programs.
Click Microsoft SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.
At the Windows PowerShell command prompt, type the following command:
Restore-SPFarm -Directory <BackupFolder> -Item Shared Services\Shared Services Applications\<ServiceApplicationName> -RecoveryMethod Overwrite [-BackupId <GUID>] [-Verbose]
Where:
<BackupFolder> is the path of the folder where the backups are stored.
<ServiceApplicationName> is the name of the service application.
<GUID> is the identifier of the backup to use in the restore process.
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.
For more information, see Restore-SPFarm.
Use Central Administration to restore the User Profile Service service application in SharePoint
Use the following procedures to restore a service application by using the SharePoint Central Administration Web site.
To restore the User Profile Service service application by using Central Administration
Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
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.
Use SQL Server tools to restore the databases associated with the User Profile Service service application in SharePoint
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, named User Profile Service_ProfileDB_<GUID>), you must also restore the Social database (by default, named User Profile Service_SocialDB_<GUID>). Failing to do so 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 service application by using SQL Server tools
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.
In Central Administration, in the System Settings section, click Manage services on server.
On the Services on Server page, find User Profile Synchronization 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, and then press ENTER:
miiskmu.exe /i exported.key {0E19E162-827E-4077-82D4-E6ABD531636E}
Where <GIUD> is the identifier of the key.
Open SQL Server Management Studio and connect to the database server.
In Object Explorer, expand Databases.
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 Overview of Recovery Models (https://go.microsoft.com/fwlink/p/?LinkId=114396) 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 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 Synchronization Service. If the service is stopped, click Start to start the service.
See Also
Concepts
Recovery (SharePoint Server 2010)
Back up a User Profile Service application (SharePoint Server 2010)
User Profile Service administration (SharePoint Server 2010)
User Profile service application overview (SharePoint Server 2010)
Windows PowerShell for SharePoint Server 2010 reference