How to Backup, Restore and Recover an Exchange 2013 Database
In this guide I will show you what options you have to backup your database using Windows Server Backup, then I will show you what additional actions you will be able to do with the tool and finally, I will show you how to perform a DB recovery.
I recently had a few people asking me about database backup / restore options so, I decided to write a detailed guide that will show you how to backup an Exchange 2013 database, then restore it and finally how to recover the emails. This is going to be a long guide 🙂
I will walk you through the following 3 Parts:
1 ) Creating a Backup using Windows Server Backup.
2) Performing a Restore from a Backup we created on a separate drive.
3) Performing a Recovery.
Most organizations use 3rd party tools to perform backups of their mail servers such as Backup exec or netvalt.
In this guide I will show you how to perform the exact processes you would if you would’ve used any of the 3rd party tools using a feature that exists in Windows Server.
This tool by Microsoft is Free (License is needed) and is Built-in the System.
All you need to do is to install Windows Server Backup , I Recommend installing it on a separate server and not on the one that has Mail Server on it , you may notice I installed it on the same server that has the mail server on but the reason is that I lack system resources for another VM machine.
Before starting with the backup we must check which Database hold the Exchange server.
The first step I’ll do on that Exchange server is to install a Role named Windows Server Backup.
Next step is to access Windows Server Backup and start the Backup Process:
As you see we have 3 options to choose from: Backup Once, Backup Schedule, and Recover.
I will choose Backup Once:
In the screenshot below you can see I’m not interested in a scheduled backup but in an instant backup.
I have two options:
Perform a full backup or to a custom backup.
In order to choose what we want to backup we need to press Add items:
I ticked only the Mailbox folder that includes the Database:
After choosing the folder we need to press on Advanced Settings:
The option I ticked means that I’m not using any 3rd party tools in the backup process.
Warning: Don’t save the backup on a local drive !! This was done in this way only for the use of this guide.
It is not recommended because as soon as our server will be damaged also our backups will be lost.
Finally press Backup:
Backup process has completed successfully
How to perform a Database Restore:
I have created a reasonable amount of emails in the mailbox and then a created the backup (Part 1), Then I Deleted the emails (Also from Deleted items).
In the screenshot below you can see that my mailbox is empty, now let’s start with the restore.
You may see the restored files that I created, It is stored on the local server, [In case you forgot :)]
Let’s open Powershell and check the last backup we made:
Now we are opening “Windows Server Backup” and click on Recover:
In the next screenshot I choose the location of the backup we created earlier:
In the next step we will be able to see the dates in bold that have a backup, as you may see the 15th:
The wizard asks what will we like to restore, Let’s choose ” File and Folders“
We mark the items we would like to restore (Database Folder):
I opened a new folder named Restore Backup in drive C:\ and I will perform the restore to there.
Restore is in progress…
We got to the most interesting part of the guide, Performing the Database Recovery:
But FOA, The Differences between Soft Recover and Hard Recover are:
Soft Recover: we will use this only when the database requires us to perform a manual restore using different parameters.
This action will connect the log files to the database and will allow us to mount the database.
Let’s open Powershell again and start the restore process using eseutil:
Status: Dirty Shutdown
As soon as the database has been restored will be in “dirty shutdown” mode we will perform a soft recovery using the following commands:
Recovery has been successfully completed.
After switching the database clean shutdown status we can advance to the next command that allows us to restore, there are some nice commands.
I’m now creating a new database named: RDBRECOVER
Let’s mount the database
I would like to check whether the database is mounted or not.
After creating the database and checking that the database has been mounted all that is left is to complete is the last restore process, I have requested to restore emails of the administrator account.
We have a final request after we finish the restore process.
So what do we leave?
Let’s check the status of the account/emails:
Looks like everything has been completed without any issues.
This guide could help you because not everybody has the budget to purchase expensive recovery tools like Veeam, BackExec, etc…