A customer has moved some thousand of their users from Lync Server 2010 to a Skype for Business Server 2015 pool. Few of these users failed with the dreaded 
 
 
  
 
Before moving more users, we needed to create a backup plan, especially as the next batch of users contains a number of CXO users, and it might not career-enhancing if they loose data.
To make a documented and tested backup and restore plan for these users, I went through the process.
User kme is homed on Lync 2010 pool and has a few contacts in the contact list.
First we use dbimpexp.exe tool to export all user data for this user (or all users for a batch of users, just exclude the /user: parameter - for 12k users, this might take up to 5 seconds)
DBImpExp.exe /user:user@sipdomain /hrxmlfile:<filename>.xml /sqlserver:<SQLFQDN>
 
 Then we move the user to the Skype for Business Server 2015 pool.
Get-CsUser user | Move-CsUser -Target <SkypePoolFQDN> -MoveConferenceData -Force
When the user has been moved, we see all the user data was lost.
Now we need to import the user data.
Update-CsUserData -FileName .\<filename>.xml -UserFilter user@sipdomain
When the user sign out and sign in, the user data has been restored.
| Distributed
  Component Object Model (DCOM) operation SetMoveResourceData failed. For
  details see inner exception (which didn't show anything useful to me). The failed users were caught in a limbo and unable to sign in again, to resolve this incident, the customer decided to move the user with -force parameter, which causes the user to loose all contact and conference data. Their support organization talked to the few users and helped them recreate their contacts.  | 
Before moving more users, we needed to create a backup plan, especially as the next batch of users contains a number of CXO users, and it might not career-enhancing if they loose data.
To make a documented and tested backup and restore plan for these users, I went through the process.
User kme is homed on Lync 2010 pool and has a few contacts in the contact list.
First we use dbimpexp.exe tool to export all user data for this user (or all users for a batch of users, just exclude the /user: parameter - for 12k users, this might take up to 5 seconds)
DBImpExp.exe /user:user@sipdomain /hrxmlfile:<filename>.xml /sqlserver:<SQLFQDN>

Get-CsUser user | Move-CsUser -Target <SkypePoolFQDN> -MoveConferenceData -Force
When the user has been moved, we see all the user data was lost.
Now we need to import the user data.
Update-CsUserData -FileName .\<filename>.xml -UserFilter user@sipdomain
When the user sign out and sign in, the user data has been restored.
In case of a major restore operation it would be more appropriate to use Import-CsUserData cmdlet. 
Import-CsUserData cmdlet overwrites any existing data and needs a restart of frontend service (RTCSRV) on all frontends in the pool to be effective. Use this in case of a vast user restore operation, with many users. When the parameter -LegacyFormat is included, a non-existing, cmdlet Convert-CsLegacyUserData is triggered. In case of legacy userdata (pre Lync 2013), the XML file must converted first using the Convert-CsUserData cmdlet. E.g. Convert-CsUserData- FileName .\kme.xml -OutputFile kme.zip -TargetVersion Current
Update-CsUserData cmdlet appends to the contact list (merges) and is a more resource demanding operation. This will be effective immediately. Use this in case of a limited user restore operation or in case some users needs to have merged the restored contact list.













