Lync Server 2010 DR scenarios – Restoring CMS server
I just realized that it’s been quite a while since I announced in my last blog that I’d publish DR procedure for SQL server holding CMS (Central Management Store).
The procedure is quite similar to previous one (Restoring Enterprise Edition Back End server NOT holding CMS), with a few important differences (such as creating CMS database, for example) :
A. Start with a clean or new server that has the same fully qualified domain name (FQDN) as the failed computer and install the operating system.
B. From a user account that is a member of the RTCUniversalServerAdmins group, log on to the server you are restoring.
C. Install SQL Server 2008 R2, 2008 or SQL Server 2005 keeping the instance names the same as before the failure.
D. Start the Lync Server Management Shell on any available Front End server: Click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Management Shell.
E. Recreate the Central Management store database. At the command line, type:
Install-CsDatabase –CentralManagementDatabase –SqlServerFqdn <FQDN> -SqlInstanceName <instance name> -Verbose
For example:
Install-CsDatabase –CentralManagementDatabase –SqlServerFqdn Server01.contoso.com -SqlInstanceName cms –Verbose
F. Set the Active Directory service control point for the Central Management store. At the command line, type:
Set-CsConfigurationStoreLocation –SqlServerFqdn <FQDN> -SqlInstanceName <instance name> -Verbose
For example:
Set-CsConfigurationStoreLocation –SqlServerFqdn Server01.contoso.com -SqlInstanceName cms –Verbose
G. Import the Central Management store data from $Backup. At the command line, type:
Import-CsConfiguration –FileName <CMS backup file name>
Example:
Import-CsConfiguration –FileName "C:\Config.zip"
H. Restore File store and share it
I. Publish the topology using Topology Builder (recommended method):
- Start Topology Builder: Click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Topology Builder.
- Click Download Topology from existing deployment, and then click OK.
- Select the topology, and then click Save. Click Yes to confirm your selection.
- Right-click the Lync Server 2010 node, and then click Publish Topology.
J. Restore Location Information data to the Central Management store database. At the command line, type:
Import-CsLisConfiguration –FileName <LIS backup file name>
For example:
Import-CsLisConfiguration –FileName "$Backup\E911Config.zip"
K. Create required databases on BE server by running the following command:
Install-CsDatabase –configuredDatabases –SqlServerFQDN <BE_FQDN>
Note: This step also creates QoeMetrics and LcsCDR if this server hosts Monitoring databases.
L. Restore user data by performing either of the following restore procedures:
Option A:
Restore RTC database from backup using SQL Server Management Studio. (use REPLACE option when restoring)
If you’re getting error stating that exclusive access to the database could not be obtained, run the following SQL Query in SQL Server Management Studio (providing correct path to backup file):
USE Master
ALTER DATABASE rtc SET SINGLE_USER with ROLLBACK IMMEDIATE
RESTORE DATABASE rtc
FROM DISK = ‘c:\backup\rtc.bak’
WITH REPLACE
GO
Option B:
Verify that at least one Front End Server in the pool is running and that the User Replicator process has completed a full synchronization cycle. If you run Dbimpexp.exe before the synchronization is complete, the command will fail.
Important:
The Lync Server 2010 User Replicator service initial synchronization process occurs when the Lync Server 2010 Front End Server is started for the first time or when a regenerate operation is initiated.
LS User Replicator will log Event ID 30024 for completed initial synchronization of AD domain and user database.
If necessary (e.g. initial user synchronization has not been completed for any reason) you can trigger synchronization cycle by issuing Update-CsUserDatabase powershell command.
To restore the user data, at the command line, type:
Dbimpexp.exe /hrxmlfile:<path and file name of backed up Rtc database> /sqlserver:<SQL Server FQDN>\<instance name> /import /restype:all
For example:
Dbimpexp.exe /hrxmlfile:D\BackupUsers.xml /sqlserver:sql.contoso.com\rtc /import /restype:all
M. If you deployed Response Group on this pool, restore the Response Group configuration data.
From a user account that is a member of the RTCUniversalServerAdmins group (or has equivalent user rights), log on to any available Front End server.
- Locate a copy of the script required for this procedure at https://blogs.technet.com/b/csps/archive/2011/02/09/scriptrgsrestore.aspx . Copy the code and paste it into a text editor, such as Notepad. Save the code as Get-CsApplicationContact.ps1.
- Start the Lync Server Management Shell: Click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Management Shell.
- At the command line, navigate to the folder where you saved the script, and then type:
Import-Module .\Get-CsApplicationContact.ps1
- To retrieve the list of Response Group contact objects that are associated with the pool, at the command line, type:
Get-CsApplicationContact –OwnerUrn "urn:application:Rgs" –Filter "(MSRTCSIP-ApplicationOptions=1)" –RegistrarPool <pool FQDN>
For example:
Get-CsApplicationContact –OwnerUrn "urn:application:Rgs" –Filter "(MSRTCSIP-ApplicationOptions=1)" –RegistrarPool "pool01.contoso.com"
- Review the output of the Get-CsApplicationContact script to verify that the contact objects listed are the ones you want to remove. To remove the contact objects, at the command line, type:
Get-CsApplicationContact –OwnerUrn "urn:application:Rgs" –Filter "(MSRTCSIP-ApplicationOptions=1)" –RegistrarPool <pool FQDN> -Delete
Note:
You are prompted to confirm the deletion of each contact object, and you can skip any contact objects that you do not want to delete.
- To restore the configuration settings, do the following:
a. If you have not already done so, locate the RgsImportExport.ps1 script in the Lync Server 2010 Resource Kit, and save it to the computer.
b. At the command line, navigate to the folder where you saved the script, and type:
Import-Module .\RgsImportExport.ps1
Import-CsRgsConfiguration ApplicationServer:pool01.contoso.com –FileName D:\RgsConfig_pool01.zip
N. If this Back End Server also hosts Archiving or Monitoring databases, restore the Archiving or Monitoring data by using a SQL Server management tool, such as SQL Server Management Studio (use REPLACE option when restoring databases)
IMPORTANT:
If Option A in step 13 was used to restore user data, Event IDs 32118 and 51009 could be logged in Lync Server Event log, caused by crossed databases chaining being disabled, in which case it will be needed to run the following command in SQL Query:
Alter database RTC set db_chaining on
Alter database RTCDYN set db_chaining on