Exchange EDB corruption and recovery
Microsoft Exchange server has revolutionized business and corporate communication and is the preferred choice among many. However, an Exchange server is not impervious to failure. A variety of issues, such as virus infection, ransomware threats, power outages, improper Exchange server shutdown, and so on, can compromise and corrupt the Exchange database file, or .edb. Another common cause of EDB file corruption is Jet errors and you must recover Exchange server from Jet Engine Errors to reinstate the mailbox data. A corrupted Exchange database cannot be accessed by an Exchange server, so it is essential to restore the EDB file to enable mailbox access.
Due to the complexity of recovering the EDB file intact, many IT administrators find it difficult to perform the recovery without proper guidance. This article describes two methods for repairing a corrupted EDB file from Exchange 2019, 2016, 2013, 2010, 2007 and 2003.
What leads to the corruption of an Exchange database file (EDB)?
One of the most common causes of Exchange database corruption is an unexpected Exchange server crash or hard-disk failure on which the Exchange server is installed. There are additional reasons, which are listed below.
- Virus infection or malware attack of your computer
- Unexpected errors on an Exchange server
- Missing or deleted transaction log files
- Physical or logical errors on the database file
How to check the Exchange mailbox for corruption?
To check the Exchange database (EDB) and mailboxes for corruption in Exchange 2003, 2007, 2010, 2013, 2016, and 2019, launch the Eseutil.exe utility from the Exchange server’s installation directory and run the command eseutil/mh to find out if the database is in Clean or Dirty Shutdown state. A Clean Shutdown indicates that the database is free from errors, whereas a Dirty Shutdown indicates that the EDB file is corrupted or inconsistent with the transaction log files, necessitating database recovery.
How to check the mailbox for corruption in Exchange 2019, 2016 and 2013?
To detect and check the database for corruption in Exchange 2010 (SP1), 2013, 2016, and 2019, run the PowerShell command New-MailboxRepairRequest using the Exchange Management Shell (EMS) for the following corruption types: AggregateCounts, FolderView, ProvisionedFolder, and SearchFolder.
The difference between Eseutil and New-MailboxRepairRequest is that, Eseutil repairs the corruption only if the database is dismounted, whereas the mailboxrepair cmdlet can repair single or multiple Exchange mailboxes from online databases without dismounting them. Let us now look at how to repair an Exchange database.
Prerequisites to repair an Exchange database file
Ensue that you meet the following prerequisites before repairing the EDB file using Eseutil.
- Make sure that you have administrator privileges to access the Exchange server.
- Take a complete backup of your Exchange database file (.EDB)
- Make a note of the Exchange server version you’re using.
- Dismount the database from the Exchange server using the Dismount-Database command.
How to repair and fix a corrupted Exchange EDB file using eseutil?
You can repair a corrupted Exchange EDB file by using Eseutil, a Microsoft built-in command line utility for performing both Soft Recovery (eseutil/r) and Hard Recovery (eseutil/p) on the database. Alternatively, you can use EdbMails Exchange recovery tool to perform complete database recovery and export EDB to PST easily.
Steps to repair corrupted Exchange EDB using eseutil
- Step 1: Locate and run the Eseutil utility from the Exchange server\bin directory.
- Step 2: Check the database status by running the command Eseutil/mh
When you run the command Eseutil/mh, the utility checks the status of the database and reports whether it is in a Clean or Dirty Shutdown state. You can remount the database only when it is in the Clean Shutdown state. If the database is in the Dirty Shutdown state, you must first perform a soft recovery to see if the database can be recovered, and then a hard recovery if the level of corruption is severe. See steps to resolve the Dirty Shutdown error of Exchange database.
If the database state shows Clean Shutdown, you can safely remount the database. The following cmdlet enables you to perform the mount operation.
Mount-Database -Identity
However, if the database is in the Dirty Shutdown state, you cannot mount it directly and it requires a complete recovery.
- Step 3: Perform a soft recovery by running the cmdlet Eseutil/r
If the database is in the Dirty Shutdown, it means that the transaction log files are missing or the EDB is severely corrupted. Depending upon the nature of the error message, you may have to perform soft and hard recovery. If you have the transaction log files, copy and paste them to the database directory and replay them with the cmdlet eseutil/r. Remount the database if no errors are found at this stage
- Step 4: Perform a hard recovery by running the cmdlet Eseutil/p
If the soft recovery fails or if the transaction log files are missing, perform a hard recovery with the cmdlet eseutil/p. Remember that the hard recovery operation purges the data that the eseutil cannot recover. This results in data loss if the EDB file is severely corrupted.
- Step 5: Defragment the Exchange database by running the cmdlet Eseutil/d.
After the hard recovery, run Isinteg or New-MailboxRepairRequest -Database until no errors are found. Check the database integrity by running the command Eseutil/g
Tip: Depending on the Exchange server, you need to execute the command New-MailboxRepairRequest -Database for Exchange 2013, 2016, 2019, or Isinteg for Exchange 2003, 2007, and 2010 to check the integrity of the database.
- Step 6: Finally, remount the Exchange database (EDB) to the server
The following cmdlet enables you to perform the mount operation
Mount-Database -Identity
Limitations of using the manual EDB recovery method
We can conclude from the preceding discussion that using Eseutil for Exchange database recovery necessitates a thorough understanding of the technical commands, and any incorrect execution of the same risks erasing all the data from the EDB file. Furthermore, this method is time-consuming and not recommended by both experts and IT administrators. We therefore recommend using a professional Exchange recovery solution, such as EdbMails, to safely recover and convert the EDB to PST.
Repair and restore corrupted EDB file in Exchange 2019, 2016, 2013, 2010 and 2007 using EdbMails
EdbMails EDB to PST converter can easily repair and convert corrupted EDB files to PST from Exchange 2019, 2016, 2013, 2010, 2007 and 2003. It can recover STM, pub.edb, priv.edb and mailbox.edb files and export them to Outlook PST without the need for an Exchange server connection or Active Directory dependency. In addition, it can also recover and convert corrupted, offline EDB files to PST without requiring transaction log files. You can preview and save mail items to HTML, EML, or MHT formats. The tool is compatible with all versions of Windows operating systems and Windows Server and enables you to migrate the mailboxes to Live Exchange server, Office 365 tenant and Hosted Exchange.
- Step 1: Backup up your STM, pub, priv.edb and mailbox.edb files
Take a complete backup of all your Exchange database files before you proceed with the repair operation.
- Step 2: Download and launch EdbMails EDB recovery software application
Download EdbMails and install the application on any computer. You can also perform the recovery and conversion by installing EdbMails on a non-exchange server computer.
See EdbMails system requirements for Exchange recovery and migration and ensure that you have Microsoft Outlook installed on your computer.
- Step 3: Click on 'Start Your Free Trial' and select the EDB recovery option
You can start using the application with the free trial version or login to the application if with the email addresses you used during license purchase. In the EdbMails recovery and migration wizard, select EDB recovery.
- Step 4: Select the corrupted EDB file to repair and convert to PST
In the next step, select the offline and corrupted Exchange database file from your computer that you want to export and migrate. EdbMails can recover pub.edb, priv.edb, stm and EDB files from Exchange 2000 and 2003.
- Step 5: Select the mailboxes, folders and start the EDB conversion
After EdbMails repairs the EDB file you can view all the mailboxes, folders from the application’s interface. Click on the emails to preview them as shown. Select the mailbox items and click 'Export to Outlook PST'. You can also import the mailboxes from the EDB into Live Exchange server and Office 365 based on your requirement.
- Step 1: Backup up your STM, pub, priv.edb and mailbox.edb files
Features of EdbMails Exchange EDB recovery
EdbMails is a feature-rich tool that allows you to easily open, view, export, and migrate your mail items from EDB to PST. Although this is not an exhaustive list, let us look at some of the application's key features.
- Convert the EDB file to PST and migrate to Office 365
The application is very useful for exporting the EDB file to PST. You can also migrate/import the EDB file into Office 365 and Exchange server in a few simple steps. It is an excellent application to repair Exchange database 2013, 2010 without requiring eseutil.
- Convert and export Exchange Public folders to PST
EdbMails can not only export user mailboxes but you can also use the tool to export Exchange Public folders to PST. It supports converting EDB files from older Exchange versions such as 2003, 2007 as well as newer Exchange such as 2019 and 2016 making it suitable for any recovery scenario.
- Include and Exclude Filter options
Many scenarios frequently require extracting and exporting Exchange emails to PST by specific date. You may also require exporting specific contacts or email folders such as Inbox, Sent Items and so on, necessitating granular brick-level EDB to PST conversion. By default, EdbMails performs item-level recovery and has a unique feature that allows you to include or exclude the mail items, folders with conditional rules and filters.
- Consistent folder hierarchy and integrity
EdbMails converter for EDB is a highly secure application that maintains perfect data formatting, and folder hierarchy structure on both the source and target without causing any data loss. This creates an identical replica of your email data ensuring 100% integrity and accuracy.
- Recover deleted mail items from EDB file
EdbMails can recover deleted mailboxes from an EDB file and restore them from a backup snapshot. It can also restore deleted emails from Exchange mailboxes and has the ability to recover both private and public folders from an EDB file and convert to PST.
- Free Software Trial Version
EdbMails EDB to PST converter comes with a Free trial version using which you can export 30 mail items from each EDB folder to PST and migrate to Office 365 and Exchange allowing you to become acquainted with the product’s functionality and features.
Concluding Words
Though the Exchange server is widely used in businesses worldwide, it is prone to corruption and data loss. A prompt recovery can therefore save both time and money. There are two approaches for repairing and recovering an Exchange EDB file: The first method is to repair the database using Microsoft's native Eseutil utility, while the second method is to use EdbMails, a Microsoft partnered Exchange database recovery tool. The native method has the drawback of being unreliable and can result in data loss. Many experts and IT administrators recommend using EdbMails to safely repair and recover an Exchange database file and convert the EDB to PST without data loss or downtime.