Wednesday 6 May 2015

Recovery Databases (RDB) in Exchange 2013

A recovery database is a special type of mailbox database that allows you to mount and extract data from a restored mailbox database.

The main purpose of a recovery database is to allow data to be recovered without the need to dismount / disrupt data access to the original database. Another way to look at is that if User A who accesses Database B deletes some emails he needs access - so you need to extract the emails from an old backup: Now you could simply mount the backup - although if you did this you would need to dismount the current version of the database (mounting the same database - albeit an older version will simply not work) - so creating / using a recovery database allows us to mount the older version of the database safely while running the current version - hence not disrupting users.

You have the ability to recover single items (i.e. email message), whole mailboxes or perform a dail tone recovery.

In order to recover data from our mailbox database backup we will firstly make sure our database is in a clean shutdown state / is up to date with logs:

Eseutil /R E01 /l C:\Recovery\RecoveryDB01\Logs /d C:\Recovery\RecoveryDB01

We will proceed by creating a recovery database to do this we must use the Exchange Shell:

New-MailboxDatabase -Recovery -Name RecoveryDB01 -Server MBX1 -EdbFilePath "C:\Recovery\RecoveryDB01\RecoveryDB01.edb" -LogFolderPath "C:\Recovery\RecoveryDB01\Logs"

We should then restart the Microsoft Exchange Information Store:
Restart-Service MSExchangeIS

We should then mount the recovery database:
Mount-Database RecoveryDB01

Ensure the mailbox we are after is present in the recovery database:
Get-MailboxDatabase -Identity "RecoveryDB01" | Get-Mailbox

And then perform the restore operation:

New-MailboxRestoreRequest -SourceDatabase DB1 -SourceStoreMailbox "Joe Bloggs" -TargetMailbox "jbloggs@contoso.com"

or for restoring to an archive mailbox we append the -TargetIsArchive attribute:

New-MaiboxRestoreRequest -SourceDatabase DB1 -SourceStoreMailbox "Joe Bloggs" -TargetMailbox "jbloggs@contoso.com" -TargetIsArchive

We can check on restoration requests with the Get-MailboxRestoreRequest cmdlet:

Get-MailboxRestoreRequest

0 comments:

Post a Comment