• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
OpenTechTips

OpenTechTips

Comprehensive IT Guides for Pros and Enthusiasts

MENUMENU
  • HOME
  • ALL TOPICS
    • Exchange
    • InfoSec
    • Linux
    • Networking
    • Scripting
      • PowerShell
    • SSL
    • Tools
    • Virtualization
    • Web
    • Windows
  • ABOUT
  • SUBSCRIBE
Home » Restore Single Mailbox Items Exchange 2016/19

Restore Single Mailbox Items Exchange 2016/19

October 12, 2020 - by Zsolt Agoston - last edited on October 18, 2020

Important messages were deleted!!!

Our starting scenario is this: important emails were deleted from a mailbox that need to be recovered. Deleted messages are purged from the retention storage.

In this case, we copy the mailbox database that contains the mailbox from a backup, mount it and copy the missing messages from the backup into the live mailbox.

  • Original mailbox: DB01
  • EDB file location: C:\ExchangeDatabases\DB01\db\DB01.edb
  • Log files location: C:\ExchangeDatabases\DB01\logs

1. Copy a mailbox database from your backup to the Exchange server.

Place the copied DB01 database from your backup in the following location:

  • EDB file location: C:\ExchangeDatabases\DB01_BACKUP\db\DB01.edb
  • Log files location: C:\ExchangeDatabases\DB01_BACKUP\logs

We leave the filename intact, although you can rename it. In that case, amend the rest of the script accordingly.

Restore Single Mailbox Items Exchange 2016/19

2. Check the backup DB for errors

Use the ESEUTIL app to check the database for errors, or clear the dirty shutdown state it's in, It is very likely if the backup was made during operation.

/r E00 <- check the log file prefix, it will be E00, E01, or similar. Use it with the /r switch

Restore Single Mailbox Items Exchange 2016/19
eseutil /r E00 /d C:\ExchangeDatabases\DB01_BACKUP\db\DB01.edb /l C:\ExchangeDatabases\DB01_BACKUP\logs
Restore Single Mailbox Items Exchange 2016/19

3. Create a recovery DB

We need to add the freshly copied backup database to the Exchange system. We use the following command to create a recovery database in Active Directory. It is necessary because this is how we'll be able to mount the database in the upcoming steps.

New-MailboxDatabase -Name "DB01_BACKUP" -Recovery -EdbFilePath C:\ExchangeDatabases\DB01_BACKUP\db\DB01.edb -LogFolderPath C:\ExchangeDatabases\DB01_BACKUP\logs -Server MB01

4. Restart the IS service

Restart-Service MsExchangeIS

5. Mount the recovery DB

Mount-Database "DB01_BACKUP"

6. Restore items in mailbox

The last step is the key step. We use the following commands which will initiate a restore session. During that process, the server will compare the backup version of the user mailbox with the live version and copy the messages that the live mailbox is missing.

$mailbox = (Get-Mailbox jdoe).ExchangeGuid

# Whole mailbox
New-MailboxRestoreRequest -Name "John Doe restore" -SourceDatabase "DB01_BACKUP" -SourceStoreMailbox $mailbox -TargetMailbox "jdoe"

# Restore items only in the "Inbox" folder
New-MailboxRestoreRequest -Name "John Doe restore" -SourceDatabase "DB01_BACKUP" -SourceStoreMailbox $mailbox -TargetMailbox "jdoe" -IncludeFolders "Inbox"
Restore Single Mailbox Items Exchange 2016/19

7. Remove the recovery DB

We are done. As an optional step we can remove and delete the backup database DB01_BACKUP as we don't need it anymore.

Remove-MailboxDatabase DB01_BACKUP

Reader Interactions

Comments Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tools

Secondary Sidebar

CONTENTS

  • Important messages were deleted!!!
  • 1. Copy a mailbox database from your backup to the Exchange server.
  • 2. Check the backup DB for errors
  • 3. Create a recovery DB
  • 4. Restart the IS service
  • 5. Mount the recovery DB
  • 6. Restore items in mailbox
  • 7. Remove the recovery DB

  • Terms of Use
  • Disclaimer
  • Privacy Policy
Manage your privacy

To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.

Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Manage options
{title} {title} {title}
Manage your privacy
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Manage options
{title} {title} {title}