SharePoint 2010 Restore–User Profile Service Error

Recently I have been doing some testing of disaster recovery scenarios in my development and QA SharePoint 2010 environments.  I noticed a couple minor issues that have been occurring after the restore process.   One issue that I will discuss in this post is a problem encountered with the User Profile Service.

Issue: After restoring a farm from a backup using the Restore-SPFarm PowerShell command the User Profile Synchronization service fails to start and I received a generic SharePoint error page when trying to access the User Profile Application management page in central administration.

I reproduced this issue multiple times on multiple farms.   Although I can reproduce the issue I was not able to come to any conclusion on what is the root cause of the problem.  I did, however, identify a fairly quick way to resolve the issue.

Resolution: To resolve the issue I deleted the User Profile Application that was created during the restore process and then recreated it.    To ensure that you do not lose any user profile content there are a few steps that must be followed:

  1. Using central administration, stop the user profile application service on all servers in the farm.
  2. Using central administration, delete the user profile application.   DO NOT check the option to “Delete data associated with the Service Applications”.
  3. Identify the names of the user profile, social, and sync databases.
  4. Run the New-SPProfileServiceApplication PowerShell command passing in parameters for: ApplicationPool, Name, MySiteHostLocation, ProfileDBName, ProfileSyncDBName, and SocialDBName.     This will create a new profile service application using your restored profile databases.
  5. Run the New-SPProfileServiceApplicationProxy PowerShell command passing in parameters for: ServiceApplication and Name.   Also include the DefaultProxyGroup parameter.
  6. Start the User Profile Service on all servers in the farm
  7. Run an IISReset command on each server.
  8. Start the User Profile Synchronization Service on the application server.  Wait for 5 – 10 minutes for the service to start.   Ensure that it is started before proceeding.
  9. Ensure that the User Profile Synchronization Timer job is enabled and set properly and then start a full import.

Always remember to test out your disaster recovery plan in a development or QA environment prior to your production launch of SharePoint 2010.

7 thoughts on “SharePoint 2010 Restore–User Profile Service Error”

  1. Thanks for the article Mike!
    We are still in the process of finalizing our DR scenarios but I have added this article to my links since I””m sure we will see similar issues.

    One question, do you have to start the User Profile Service on every server in the farm? We c urrently only have it started on the App Server but I wasn””t sure if it needs to be on the WFEs as well. Thanks

  2. You saved my life!!! THANKS Mike!!

    I just tried to restore both in SharePoint Central Admin and PowerShell but none works for me, I was really frustrated with this issue 🙁

    Currently My UPSA is back again 🙂

    Anyway, after User Profile Synchronization Service is started, I still face the error page when I try to manage UPSA. I have to restart IIS again and all things are work like a charm 😀

    Again, Thank you very very much 😀

  3. Thank you, Thank you, Thank you very very much!!!!!!! you just saved my life, after peeling all the hair from my head I managed to follow your instructions and it”s up an running again!!!! jajaja, now I can go on vacation!!!!

  4. Thanks! It worked.

    In my case, I got same another error, because of an SQL error like “login failed – database ”xxx” does not exists”.
    As soon the service was recreated, everything went ok.


  5. Thank you for this article !

    I have run it on dev platform without problem, but on prod (not a joke !) I cannot re create the UPA and have the following message :
    “A SharePoint database named [DB name] already exists..”

    Any info ?

Leave a Reply