We have seen in part 1 of this tutorial the classical approach to single mailbox recovery from backups using Exchange 2010 and how this method can only restore the mailbox content to a new structure and this could be annoying for some.
Analyzing the findings of our first approach we can deduce that the problem lies behind the fact that the new mailbox of user2 has a different GUID than the one in the backup. So, logically, changing the GUID of the new mailbox and setting it to the same as the one in backup should solve the issue right ?
Let’s see how we can accomplish this to make the magic happens.
Disclaimer:This article contains steps that tell you how to use ADSIEdit.msc. However, serious problems might occur if you use it incorrectly. Therefore, make sure that you follow these steps carefully and I cannot be held responsible for any damage you might bring do to your system.
Retrieving the GUID of the backed up mailbox
The plan sounds very simple but putting into action is just a bit more complex. We need first to get the GUID of the mailbox that was backed up and is currently mounted in the “Recovery Database”. This can be done using Exchange Management Shell by running
Get-MailboxStatistics -Database RecoveryDatabase | fl DisplayName,MailboxGuid
Finding the GUID of the new mailbox
We should now find the GUID of the new mailbox of user2. To do so we will use the ADSIedit.msc
- Run ADSIEdit.msc
- Connect to the “Default Naming Context”
- Browse to where is located the user you are trying to recover
- Right-click -> Properties
- Find the MSExchMailboxGuid attribute
Analyzing the MSExchMailboxGuid attribute
If you click on the edit box and compare both MSExchMailboxGuid values, the one showing outside and the one in hexadecimal format, you will notice they do not match one to one.
Here is how to convert from one value to the other.
The “dashed-value” of user2 mailbox is 22ecdf44-d001-4486-bb73-538a3d86d8d5
Take each portion before the 3rd dash and write down the bytes backward for example
22ecdf44 will become 44 DF EC 22
d001 will become 01 D0
4486 will become 86 44
then take the last two portions as they are: BB 73 53 8A 3D 86 D8 D5
So the Hexadecimal value of
22ecdf44-d001-4486-bb73-538a3d86d8d5 is 44 DF EC 22 01 D0 86 44 BB 73 53 8A 3D 86 D8 D5
Let’s apply the same logic on the GUID retrieved from the backup
9d9c537a-9c00-4949-a7c8-9c62b5a2d48e to get its hex value:
7A 53 9C 9D 00 9C 49 49 A7 C8 9C 62 B5 A2 D4 8E
Insert the calculated hexadecimal value to replace the current user2 mailbox GUID.
Recovering the mailbox
It is now time to test and see if what we did was fruitful, so let’s go to Exchange Management Shell and run again
Restore-Mailbox user2 -RecoveryDatabase recdb
As you can notice the command will finish without any errors, and logging to user2 mailbox will show the mailbox fully recovered with all items back in their original place.
In this 2 parts tutorial I have went through all steps required to recover a single mailbox from backup when running Microsoft Exchange 2010. In part 1 I have covered the “traditional” way to do it and showed how the items will be recovered in a side folder structure, in part 2 I have showed you have you can use ADSIEdit to change the GUID of the user’s mailbox to be able to recover items to their original location.
Hope you enjoyed the article.
Part 1 – Backup Exchange 2010 for free (at simple-talk.com)
Part 2 – Restore Exchange 2010 (at simple-talk.com)
Part 3 – Single Mailbox Recovery in Exchange 2010 – Classical approach
Part 4 – Single Mailbox Recovery in Exchange 2010 – Magic