MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

Disaster Recovery & The power of Exchange Database

Hello everyone and I am back with one more article of Disaster Recovery. Well I am not here to discuss about the traditional Disaster Recovery method, however I will be talking about the options and the scenarios which will help you to get back in action within the said time (aka SLA). Managing Exchange server and planning for a Disaster Recovery is what the job of a good and expert Administrator. Everyday some way or the other administrators struggle when disaster strikes. And they keep on searching the web as to what options are available to bring back the Exchange Server in action.

Well the hidden power of Exchange database is what I am going to talk. Consider a scenario wherein my whole Active Directory along with Exchange is crashed.

Normally in the real world people build the Active Directory from scratch or they perform an AD System state restore. But that depends no how the restore was performed.

In this article we are going to walk you through the process of getting all Active Directory Mailbox Enabled User Objects along with Exchange Mailboxes using Exchange Mailbox Database known as Priv1.edb and Priv1.stm.

I always recommend people to have atleast one offline copy of Exchange Database, since they are in clean shutdown and very easy to restore.

With that said lets move on.

In the below screen I have taken a offline copy of Exchange Database.

Priv1.edb & Priv1.stm. 

Figure 1: Folder contains Offline copy of Exchange Database.

Figure 2: Offline copy of Exchange Database which is in clean shutdown.

Figure 3: In the above screen Active Directory is crashed and everything is lost.

Figure 4: In the above screen Exchange Server is crashed.

In the real world scenario if an Exchange Server is Crashed then Administrators are under real pressure and they end up with rebuilding new Active Directory and Exchange Infrastructure to meet the SLA. Its very difficult to bring back the Mailboxes back into production in that scenario.

Before you perform the above steps this are the prerequisites which is mandatory to bring back the AD along with Exchange server.

1) Active Directory System State Backup to restore other objects such as Contacts, Distribution Lists and etc.

2) Exchange Server Database Backup Both online and offline copy.

Make a note of your domain name along with Exchange Organization Name and Administrative Group Name.

In the below screen I have built an Active Directory domain by the same name as “MSEXCHANGEGURU.COM”.  

Figure 5: Newly built Active Directory Domain “MSEXCHANGEGURU.COM” which has no user objects.

In the below screen I have installed Exchange Server 2003 with the same Org Name as “MSEXCHANGEGURU” and the Administrative Group name is “First Administrative Group” with the same version of Exchange and Service Packs.  

Figure 6: New Exchange Server without any Mailbox. Remember we have the same Org name and AG name.

Now we will begin restoring the offline copy of Exchange DB which we have kept in a safe place.

If you are maintaining a Tape Backup then you have to perform a restore using either third party or NtBackup. If it’s in a disk then it is just a copy paste and you are done. In this example we have used the disk to backup the exchange database.  

Figure 7: Restore Offline Backup.

Figure 8: This is how the restored data looks like inside the folder.

Before I restore the Data into Exchange. There are few commands which I have to execute on this database thus to ensure that my data is in good shape.  

Figure 9: Checking Database Health using Eseutil Command.

Once this is done I have to ensure that my ORG name and AG is same without which I wont be able to mount my exchange database. To do that you have to open command prompt and then type as mentioned below.

Figure10: Org Name and AG name.

In figure 10 when you have a closure look you will be able to find out something which is more interesting other than Org Name and AG is the Users Distinguished Name which looks like this.

CN=Ratish Nair, OU=MSEXCHANGEGURU, DC=MSEXCHANGEGURU, DC=COM 

User Ratish Nair was residing in OU=MSEXCHANGEGURU in the domain named as MSEXCHANGEGURU.COM

That makes your life simple and easy to understand as to where this objects were residing before AD crashed.

Now lets try to mount the DB. Before we do that we have to ensure that the stores are dismounted and the option This Database can be overwritten by a restore is selected in the Mailbox store properties.

If that option is not selected then you will get this error.  

Figure 11: Error while mounting the Restored Database. 

Figure 12: Checkbox to select while you restore any backup and try to mount the Database.

Figure 13: In the above screen the stores are mounted with all disconnected Mailboxes.

If your organization is small with some few users then you can manually create the Associated Account and connect this Mailboxes manually, however what if we have around thousand Mailboxes. In that case its very difficult.

In Exchange System Manager under Tools you have something known as Mailbox Recovery Center. Right
click Mailbox Recovery Center and select Add Mailbox Store.  

Figure 14: In the above screen you will be able to see all mailboxes as disconnected.

Now we will exclude Administrator, System Mailbox, SMTP and System Attendant Mailbox, since they are already present in the production.

Figure 15: Right click all Mailbox except system mailbox and select Export as shown above. 

Figure 16: Export Mailbox Wizard  

Figure 17: Specify the Destination container.

I have created a container manually as “MSEXCHANGEGURU” as mentioned in figure 10.

Figure 18: Exporting the file to Export.ldf. 

Figure 19: Export completed successfully.

Now lets open and see how does the export.ldf looks like. 

 

Figure 20: Above screen has information about AD user object.

Now lets import this user objects to AD and then reconnect all mailboxes. 

 

Figure 21: Has 21 Objects Imported using the Ldifde command.  

Figure 22: Has all User Accounts which were lost in the same OU “MSEXCHANGEGURU”.

Now let’s reconnect all Mailboxes using Mailbox Recovery Center.  

Figure 23: Select Find match by just right clicking the Mailboxes.

This will find the user accounts which were recently exported. Finish the wizard which is very simple.  

Figure 24: In the above screen just select Reconnect.

This will reconnect all Mailboxes with associated User account in just a few minutes.  

Figure 25: Reconnect Wizard which is self explanatory and completes in few minutes.

Below screen has all mailboxes connected and the Exchange server is back in production. The whole process should not take more than 2 hours to bring back the Exchange Along with Active Directory.

 

Figure 26: Exchange Server is back in Production with Zero loss of Data.

The above example is just to restore AD Users and Exchange Mailboxes. If you want to get the Mail Enabled contacts, public folders and DL then you have to go for AD system state restore and an alternate option to get the Public folders.

Remember that if you have a very large AD Sites and Services then the options are different. Please ensure that you know what you are doing.

I hope that the information provided above is useful. Do share your feedbacks and suggestions.

More Disaster Recovery articles for Exchange 2007 and 2010 are coming on the way….

Sunder
Learn Exchange the Guru Way!!!

6 Responses to “Disaster Recovery & The power of Exchange Database”

  1. Stan Says:

    Thank you. good one indeed.

  2. Balti Says:

    Thanks for the great post and keep up the good work.

  3. Sachin M Panchal Says:

    Very nicely documented all the steps.
    Great………………….. Work

  4. yogee Says:

    GR8 article, try to provide each and every steps to perform complete restore of AD and exchage for upcomming exchage admin. awating future article. thank you…

  5. Shyam Says:

    Hi Sunder,

    Amazing one.really this article will be helpful for all the MS Exchange Admins.We really appreciate to all of you that you guys are really cuming up with lots of Incidents.which are really helpful for us.

    Thankyou

    /Shyam

  6. ExchangeBiker Says:

    Thank you Mate.

Leave a Reply

ad

Categories

Archives