Microsoft Exchange Server is a robust platform for messaging and collaboration within enterprises. Besides the usual email communication support, it also facilitates contact management, scheduling, and task organization. The platform stores the mailbox data in the Exchange database files (EDB), helping businesses manage voluminous communication safely and efficiently.
Often, the EDB file becomes corrupt or goes offline due to power outages, disk storage issues, system crashes, or other unexpected mishaps. This compels organizations to face issues like inaccessibility to mailbox data and communication disruptions, hampering the business operations in their entirety.
To avoid any such event, having a concrete Exchange database restoration strategy becomes unavoidable. Moving on with the topic, this blog acts as a complete guide to restoring your Exchange database through manual and automated methods.
The Importance of the Database in Exchange Server
An Exchange database (EDB) is a unit of granularity where you can create, store, and arrange mailbox data effectively and systematically. Here are some of the essential tasks it performs
- Proper mailbox arrangements to maintain data integrity, prevent data duplication, and reduce the possibility of errors
- Ensure quick, consistent, and error-free business operations and communications
- Critical monitoring tasks, such as fixing performance issues, looking out for improvement scope, and ensuring deployment and integrations
- Monitor health, availability, and performance of other Exchange-related Windows services
Sensing its significance in keeping the Exchange Server operational and continuing the business operations of the organizations, proper database management is crucial.
Any type of corruption or damage to the database file could pose a major threat to data integrity and consistency. Despite adopting all the requisite measures, the database can malfunction. In such an event, restoring the Exchange database safely becomes an inevitable priority.
Methods to restore the Exchange database safely
Here is an insight into different ways you can use to safely recover your Exchange database from corruption or damage.
Restore the Exchange database using the Windows Server Backup (WSB)
This method will work effectively only if you have a healthy Exchange database backup. Follow the steps below to perform the restore operation:
- Open the Windows Server Backup (WSB) with administrator credentials
- In the WSB window, right-click Local Backup
- From the multiple options visible in the context menu, click Recover
- In the resulting Recovery wizard page, you will have to select one of the two given options:
- This Server (Your Server Name): If the data you want to recover is on the local server
- A backup stored on another location Server (or backup): If the data you want to recover, is on a different server or a computer.
- Click Next to getthe Select Backup Date page
- Select the date of the backup you want for the recovery, and click Next
- The next page of the wizard will be Select Recovery Type
- Select Applications and click Next
- In the Select Application page, select Exchange as the application to recover and click Next
- You will get the Select Recovery Type page, showing two options:
- Recover to original location
- Recover to another location.
- Choose any of these options. For example, Recover to another location, and click Next
- Verify the correctness of the selected settings
- Wait for the Recovery Progress to complete. Once done, mount the database and check for its successful restoration.
- You can use Exchange Management Shell commands for these tasks:
- Mount-Database DB01 – To mount the database (Change DB01 with your database name)
- Get-MailboxDatabase -Server -Status | fl Name,*FullBackup – To check the status of the database in the Exchange Management Shell
If you still see the error, using the Eseutil command can be your next move to resolve the issue.
Restore the Exchange database using Eseutil
Seeking the help of the Eseutil method is another widely used alternative to restore the Exchange database to a Clean Shutdown state. Once restored, you can mount it to the Exchange Server by using the Exchange Admin Center (EAC) or Exchange Management Shell (EMS), through the Mount-Database cmdlet. To perform the recovery by using Eseutil, you can try two different methods:
You can recover the database to a Clean Shutdown state by using Eseutil and then use Exchange Admin Center (EAC) or Mount-Database cmdlet in Exchange Management Shell (EMS) to mount it. Eseutil has two methods of recovery – soft recovery and hard recovery.
Soft recovery
You can use the switch ‘/r’ to perform soft recovery through Eseutil. This recovery process reruns uncommitted transaction logs into the database files to repair the inconsistent Exchange database. The motive of the recovery method is to bring the Dirty Shutdown state of the database to the Clean Shutdown state without causing data loss. Here is the command
ESEUTIL /R E00 /d /I /L “E:\RecoverDB\MBX\LogFiles
Make sure to replace the log file location with the location of your respective Exchange server.
In case of a large database, the process may take some additional time. After the completion of the recovery, run the diagnostic switch /mh with Eseutil to find the state of the database.
Eseutil /MH
If it is a Clean Shutdown, proceed to mount it. If it is still in Dirty Shutdown state, start the hard recovery process.
Hard Recovery
If it shows Dirty Shutdown, the database is still inconsistent, and you need to run the Eseutil hard recovery.
Eseutil /P “EX01EDB001.edb”
This command will display a warning about data loss. If you wish to proceed, click OK. It will remove the following from the database:
- Irrecoverable mailboxes
- Irrecoverable mail items
- Uncommitted changes made to the database
If you accidentally stop or close the hard repair process, it will permanently damage the database. So be careful when performing it.
Restore Exchange Mailbox using the Recovery Database
You can recover the Exchange mailbox for a specific user with the help of a recovery database (RDB). Here are the steps:
1. To create the RDB, use the following PowerShell cmdlet in the Exchange Management Shell (EMS):
New-MailboxDatabase -Recovery -Name <Name of RDBe> -Server <ServerName> -EdbFilePath <RDBPathandFileName> -LogFolderPath <LogFilePath>
Ensure to have a unique name for the RDB and server
2. Restart the Exchange Information Store service
Restart-Service MSExchangeIS
Alternatively, you can type services.msc in the command line. This will restart the Microsoft Exchange Information Store service in the Microsoft Services Console.
3. Mount the recovery database (RDB)
After creating the RDB, mount it in the Exchange Server by using the below PowerShell cmdlet:
Mount-database RDB001
4. Check the RDB if it contains any data.
Get-MailboxStatistics -Database RDB001 | Format-Table DisplayName,MailboxGUID -AutoSize
This will display the Mailbox Name and Mailbox ID required to shift the recovered email to a different mailbox.
5. Consider the recovery of a mailbox with id- 8aa77cb3-dc38-1f48-72e5-44702e737f61. Here is the command to restore the mailbox from the RDB by using this mailbox ID.
New-MailboxRestoreRequest -SourceDatabase RDB001 -SourceStoreMailbox 8aa77cb3-dc38-1f48-72e5-44702e737f61 -TargetMailbox RDB002
6. If you want to recover the mailbox with the name, for example, “MBXuser1”, here is the command.
New-MailboxRestoreRequest -Name “User Mailbox Recovery” -SourceDatabase RDB001 – SourceStoreMailbox ” MBXuser1″ -TargetMailbox ” RDB002″
7. After completing the recovery process, delete the Mailbox Restore Request by using the following command:
Get-MailboxRestoreRequest | where status -eq completed | Remove-MailboxRestoreRequest
8. Finally, dismount the RDB
Dismount-Database RDB001
Access the recovered Exchange mailbox through Outlook for the Web. Also, verify the recovery of all the required user data.
Database recovery using Exchange recovery software
A comparably better, quicker, and easier method to restore Exchange database safely would be to opt for Exchange recovery software. MVPS and admins in the organizations prefer these tools owing to the multiple features they provide:
- Repair damaged or corrupt EDB files
- Recover deleted mailbox items
- Export restored mailboxes to PST, Live Exchange or Office 365
- Carry out eDiscovery Search & Granular Recovery for Online Exchange Server
- Enable getting the preview of mailbox items before saving
These tools are easily available online from renowned organizations. Stellar Repair for Exchange is a viable option to help you in this context.
Conclusion
Microsoft Exchange Server is a widely used platform for communication and collaboration in organizations. It stores all its mailbox data in the Exchange database files, which are safe and secure from intrusion. Nevertheless, the database can become corrupt or damaged due to server crash, system shutdown, misconfigured server settings, malware attack, etc.
Restoring the database from such damage is crucial to enable organizations to continue their business operations. Admins prefer several methods to serve this purpose. For example, they proceed to restore EDB files using Windows Server Backup (WSB), Eseutil commands, or Recovery Database.
All these are core technical methods and run the risk of errors. To remedy this situation, using Exchangerecovery software such as Stellar Repair for Exchange can be a suitable alternative. The tool is easy-to-use, efficient, and quick to restore Exchange database without requiring you to have deep technical knowledge.
Read Also: