Rebuild an Entire Database Availability Group
思韵闪耀
2019-08-03
0

A database availability group (DAG), together with mailbox database copies, can provide automatic recovery from a variety of server, storage, network, and other hardware failures. A DAG can also provide a site resilience solution so that you can perform a datacenter switchover in the event of a site-level disaster. But even a comprehensive, intelligent, and robust solution such as a DAG can't protect you from all possible disasters, including disasters that affect an entire DAG.

For example, consider a two-member DAG deployed in a single datacenter. If the datacenter experiences a flood, fire, or other cataclysmic event that destroys the DAG, the entire DAG will need to be rebuilt from scratch. Rebuilding a DAG is a straightforward process that consists of nine primary steps:

  1. Prepare Active Directory for the introduction of servers with the same name

  2. Prepare the DAG's cluster name object

  3. Remove the database copies from the DAG

  4. Remove the Mailbox servers from the DAG

  5. Build replacement Mailbox servers

  6. Run Setup /m:RecoverServer on each DAG member

  7. Restore and/or mount mailbox databases

  8. Add Mailbox servers to the DAG

  9. Add mailbox database copies to the DAG

We'll take a closer look at each of these steps, but first let me illustrate the example environment that you'll work with throughout this article.

Example DAG Environment

In this article, you'll work with a two-member DAG named DAG1 that contains Mailbox servers named MBX1 and MBX2. MBX1 hosts the active copy of a database named DAG1-DB1, which is replicated to MBX2. In addition to hosting the passive copy of DAG1-DB1, MBX2 also hosts the active copy of DAG1-DB2, which is replicated to MBX1.

DAG used in example recovery

DAG used in Example Recovery

Prepare Active Directory for the Introduction of Servers with the Same Name

Microsoft Exchange Server 2010 derives security permissions based on the computer account for each server. To preserve these security permissions, the computer account for each DAG member needs to be reset and disabled using Active Directory Users and Computers.

  1. Using Active Directory Users and Computers, locate the computer account for each DAG member.

  2. Right-click the computer account for MBX1, point to All Tasks, and then select Reset Account.

  3. Right-click the computer account for MBX1, point to All Tasks, and then select Disable Account. When the prompt appears, click Yes, and then click OK.

  4. Repeat steps 2 and 3 for MBX2.

After Active Directory replication is complete, you can build new Windows servers using the names MBX1 and MBX2. If you've already built two replacement servers, you can rename them to MBX1 and MBX2 respectively.

Prepare the DAG's Cluster Name Object

Each DAG has an underlying Windows failover cluster. The name you give to a DAG becomes the name of the cluster, and a corresponding cluster name object (CNO) is created in Active Directory with this name. A CNO is the equivalent of a computer account for a cluster.

The names of the DAG and the CNO aren't used by end users or administrators. They're used by the system for internal communication and to secure the DAG. To preserve and reuse this name for the rebuilt DAG, the CNO for the DAG also needs to be reset and disabled using Active Directory Users and Computers.

  1. Using Active Directory Users and Computers, locate the CNO for the DAG. In our example, the name of the CNO is DAG1.

  2. Right-click the computer account for DAG1, point to All Tasks, and then select Reset Account.

  3. Right-click the computer account for DAG1, point to All Tasks, and then select Disable Account. When the prompt appears, click Yes, and then click OK.

Allow time for Active Directory replication to complete before proceeding with the next step.

Remove the Database Copies from the DAG

Before you can recover Mailbox servers that are members of a DAG, you must first remove all mailbox database copies from the server. When that is complete, you must then remove the server from the DAG. In our example environment, this process involves removing all passive database copies from the DAG. Specifically, you would use the Remove-MailboxDatabaseCopy cmdlet to remove the passive copy of DAG1-DB1 from MBX2 and the passive copy of DAG1-DB2 from MBX1.

  1. Run the following Exchange Management Shell commands.

    Remove-MailboxDatabaseCopy -Identity DAG1-DB1\MBX2 -Confirm:$False
    Remove-MailboxDatabaseCopy -Identity DAG1-DB2\MBX1 -Confirm:$False
    
  2. Because the DAG members aren't operational, the commands will complete successfully but with several warning messages. You can verify that each mailbox database has a single copy by using the Get-MailboxDatabase cmdlet, as shown in the following examples.

    Get-MailboxDatabase -Server MBX1 | Format-List Name,DatabaseCopies
    Get-MailboxDatabase -Server MBX2 | Format-List Name,DatabaseCopies
    

Remove the Mailbox Servers from the DAG

Before you can recover a Mailbox server that is a member of a DAG, you must first use the Remove-DatabaseAvailabilityGroupServer cmdlet to remove the Mailbox server from the DAG. Because our example is a disaster recovery operation, we assume that MBX1 and MBX2 are either not operational or don't exist. As a result, the ConfigurationOnly parameter is used with the Remove-DatabaseAvailabilityGroupServer cmdlet. When this parameter is used, Remove-DatabaseAvailabilityGroupServer removes the Mailbox server from the DAG object in Active Directory.

  1. Run the following Exchange Management Shell commands.

    Remove-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX1 -ConfigurationOnly:$True -Confirm:$False
    Remove-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX2 -ConfigurationOnly:$True -Confirm:$False
    
  2. You can verify that each DAG member was removed by using the Get-DatabaseAvailabilityGroup cmdlet, as shown in this example.

    Get-DatabaseAvailabilityGroup -Identity DAG1 | Format-List Servers
    

    After all DAG members are removed, the Get-DatabaseAvailabilityGroup cmdlet should return a Servers attribute that's empty.

Build Replacement Mailbox Servers

The next step is to rebuild the servers you're recovering, using the same computer names as the original production servers (in this example, MBX1 and MBX2), and the same operating system version as the servers being recovered.

Note

The server recovery process is based on the name of the computer on which Setup is run. You can use different IP addresses, but the name of the server must match the original Mailbox server name for server recovery to complete.

The rebuild process is effectively the same process used to build the original production Mailbox servers.

  1. Install and configure Windows Server.

  2. Rename the computer with the appropriate name.

  3. Join the computer to the appropriate Active Directory domain.

  4. Install the prerequisites for running installed Exchange server roles. For details, see Exchange 2010 System Requirements.

Run Setup /m:RecoverServer on Each DAG Member

After the replacement servers are built and ready for Exchange server recovery, the next step is to run the Exchange 2010 unattended setup process in recovery mode. You don't need to complete this step on each DAG member before moving to the next step (restoring and/or mounting databases). However, you do need to perform this step for each DAG member on which you want to mount databases.

  1. Open a Command Prompt window and navigate to the Exchange 2010 installation files.

  2. Run the following command.

    Setup /m:RecoverServer
    
  3. After Setup completes successfully, restart the recovered server to complete the recovery process.

Restore and/or Mount Mailbox Databases

Depending on the nature of the failure, the previously active copy of the databases hosted on these servers may not be available. If the files on disk are preserved and in their original location or copied to the original location, you should be able to use the Mount-Database cmdlet to mount the databases. Alternatively, you can restore your databases from backup to their original location, and then mount the databases.

After your mailbox databases are restored and/or mounted, service and data access should be restored for clients. The final steps are to reconfigure the Mailbox servers and databases for high availability by adding the recovered servers back to the DAG, and then creating mailbox database copies.

Add Mailbox Servers to the DAG

Adding Mailbox servers to a DAG can be accomplished by using the Add-DatabaseAvailabilityGroupServer cmdlet.

  1. Run the following Exchange Management Shell commands.

    Add-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX1
    Add-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX2
    
  2. You can verify that each DAG member was added by using the Get-DatabaseAvailabilityGroup cmdlet, as shown in this example.

    Get-DatabaseAvailabilityGroup -Identity DAG1 | Format-List Servers
    

Add Mailbox Database Copies to the DAG

The final step is to add mailbox database copies back to the appropriate DAG member. Depending on the nature of the failure, the previously passive copies of the databases hosted on these servers may not be available. If the files on disk are preserved and in their original location or copied to the original location, the Microsoft Exchange Replication service may be able to perform an incremental resynchronization of the passive copies, thereby eliminating the need for a full reseed. However, if the original passive copies aren't available, you'll need to perform a full reseed.

  1. To add the mailbox database copies back to the DAG, run the following commands.

    Add-MailboxDatabaseCopy -Identity DAG1-DB1 -MailboxServer MBX2
    Add-MailboxDatabaseCopy -Identity DAG1-DB2 -MailboxServer MBX1
    
  2. You can verify that each mailbox database copy was added successfully by using the Get-MailboxDatabase cmdlet, as shown in the following example.

    Get-MailboxDatabase | Format-List Name,DatabaseCopies
    
  3. You can also verify the health and status of all mailbox database copies in the DAG by using the Get-MailboxDatabaseCopyStatus cmdlet, as shown in these examples.

    Get-MailboxDatabaseCopyStatus -Server MBX1
    Get-MailboxDatabaseCopyStatus -Server MBX2


【版权声明】
本站部分内容来源于互联网,本站不拥有所有权,不承担相关法律责任。如果发现本站有侵权的内容,欢迎发送邮件至masing@13sy.com 举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

相关内容

Windows serve...
Windows server2019安装Intel I219-V网...
2025-01-15
windows下安装Pre...
windows下安装PrestaShop报错Unable to g...
2024-06-16
Windows通过命令对文...
Windows通过命令对文件夹赋权要在Windows上使用命令行(...
2024-04-30
docker-compos...
1.Compose介绍 DockerCompose是一个用来定义和...
2024-04-26
Windows计划任务出现...
最近遇见一个奇怪的现象,系统定时任务调用一个批处理,定时执行错误,...
2024-03-25
firewall-cmd ...
firewalld的简要说明:firewalld 、firewal...
2024-03-15

热门资讯

Exchange 2013/2... Exchange 2013/2016/2019邮件大小限制 可以在三个位置上配置Exchange上的...
SMTP 发送邮件错误码和解决... SMTP错误码/建议解决方法 错误总表 420 1. Timeout Communication P...
Exchange 2013 O... 最近在Exchange 2013环境中,遇到OWA/ECP无法访问的问题;用户是可以正常通过...
彻底卸载Exchange Se... 一般来说,我们安装完Exchange Server 2016之后,可以通过正常卸载程序来进行卸载,但...
Exchange 2013批量... 一批量删除特定主题的邮件 1.1批量删除所有数据库中特定主题的邮件 1)群发了几封主题为backup...
快速查看已安装Exchange... Exchange 2010的版本号在Exchange管理控制台(EMC)显示的,好像不准确了。比如,...
在 Exchange 2016... 用户邮箱是与人员关联的 Exchange 邮箱,通常为每人一个邮箱。每个用户邮箱都有一个关联的 Ac...
exchange2013域名(... 需要对 接受的域 和 电子邮件地址策略进行配置: 首先外网域名要做解析和增加mx记录,这里就不具体说...
如何为AD 添加多个UPN后缀 今天我在群里看到有群友在问User principal name (UPN)多后缀的问题,我在这里就...
EMS实用命令收集 Exchange Server 2013 运维系列运行邮件删除命令 Exchange Managem...