Exchange Server 2010 has a feature called Database Portability. This is the capability for a mailbox database from one Mailbox server to be mounted on another Mailbox server within the same organization.

In this article I will demonstrate how you can use Database Portability in a disaster recovery situation.

First we need to understand a few key points about Database Portability:

  • the mailbox database can only be mounted on another Mailbox server within the same Exchange organization
  • the mailbox database can’t be from an earlier version of Exchange Server
  • the database can’t be a public folder database

In this example scenario a Mailbox server has failed, and another Mailbox server is available to mount the database from the failed server.

There are different approaches that could be taken instead of using Database Portability, such as:

The first step is to get the database and log files onto the server where you want to mount them. This could be done by restoring them from backup, or by attaching the same storage that was on the old server to the new server.

Exchange Server 2010: Using Database Portability for Disaster Recovery

Before we proceed further we need to check what shutdown state the database is in. Open the Exchange Management Shell and navigate to the folder containing the database file. Then run the following command to check the database state.

g:\Data\MB-HO-01\>eseutil /mh MB-HO-01.edb | findstr "State:"
            State: Dirty Shutdown

With a database in a dirty shutdown state, and all of the transaction log files available, we can perform a soft recovery of the database. This commits any uncommitted transaction logs into the database so that there is no data loss. If you don’t have the transaction logs, or your database is in a clean shutdown state, then you can skip this step.

From the folder that contains the transaction logs run the following command, replacing “E00” with the log file prefix for your database.

F:\Logs\MB-HO-01\>eseutil /r E00 /d G:\Data\MB-HO-01

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 14.01
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating RECOVERY mode...
    Logfile base name: E00
            Log files:
         System files:
   Database Directory: G:\Data\MB-HO-01

Performing soft recovery...
                      Restore Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................

Operation completed successfully in 1.938 seconds.

Note the use of the /d parameter to specify the location of the mailbox database file. This is required if it not in the same path as on the original server.

Create a new mailbox database on the Mailbox server you are using to mount the database. Specify paths for the transaction logs and database file that are different to the current location.

[PS] G:\>New-MailboxDatabase -Server esp-ho-ex2010a -Name MB-HO-01-Recovered -LogFolderPath F:\Logs\MB-HO-01-Recovered -EdbFilePath G:\Data\MB-HO-01-Recovered\MB-HO-01.edb

Name                           Server          Recovery        ReplicationType
----                           ------          --------        ---------------
MB-HO-01-Recovered             ESP-HO-EX2010A  False           None

Copy the database and log files from their current locations into the locations that you specified when creating the new mailbox database.

Exchange Server 2010: Using Database Portability for Disaster Recovery

Mark the database as overwritable.

[PS] G:\>Set-MailboxDatabase MB-HO-01-Recovered -AllowFileRestore:$true

Now mount the mailbox database.

[PS] G:\>Mount-Database MB-HO-01-Recovered

At this stage we’ve got the mailbox successfully mounted, but the users with mailboxes on that database are still pointing to the old server and database name.

[PS] G:\>Get-Mailbox -Database MB-HO-01

Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
Administrator             Administrator        esp-ho-ex2010b   unlimited
Alan.Reid                 Alan.Reid            esp-ho-ex2010b   unlimited
Alex.Heyne                Alex.Heyne           esp-ho-ex2010b   unlimited
Aisha.Bhari               Aisha.Bhari          esp-ho-ex2010b   unlimited
Aleisha.Harrison          Aleisha.Harrison     esp-ho-ex2010b   unlimited

So the final step is to update the attributes for those user accounts to point to the new mailbox database.

[PS] G:\>Get-Mailbox -Database MB-HO-01 | Set-Mailbox -Database MB-HO-01-Recovered

Confirm
Rehoming mailbox "exchangeserverpro.net/Users/Administrator" to database "MB-HO-01-Recovered". This operation will only
 modify the mailbox's Active Directory configuration. Be aware that the current mailbox content will become
inaccessible to the user.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a

Now we can see that the user accounts have been updated with the new attribute.

[PS] G:\>Get-Mailbox -Database MB-HO-01-Recovered

Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
Administrator             Administrator        esp-ho-ex2010a   unlimited
Alan.Reid                 Alan.Reid            esp-ho-ex2010a   unlimited
Alex.Heyne                Alex.Heyne           esp-ho-ex2010a   unlimited
Aisha.Bhari               Aisha.Bhari          esp-ho-ex2010a   unlimited
Aleisha.Harrison          Aleisha.Harrison     esp-ho-ex2010a   unlimited

The users will now be able to connect to their mailboxes again under the following assumptions:

  • The updated user account attributes may need to replicate through Active Directory
  • Outlook 2007/2010 and Outlook Web App users will automatically connect to the new database
  • Outlook 2003 clients will require a manual profile update to connect to the new database

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

  1. Victor Cadenas

    Una consulta. Puedo montar un respaldo de una base de datos de buzones sin eliminar el que está en produccion. Estando en diferentes ubicaciones. O necesariamente podria haber un inconveniente con el nombre? Ya que la BD actual y la restaurada tienen el mismo nombre?. Gracias.

  2. Pradeep Kumawat

    Hi Paul, Is it possible to mount Exchange 2010 DB to Exchange 2013? Actually I have Exchange 2010 but that vm is continuously showing errors and working very slow. So I created a fresh VM and installed exchange 2013 on it. Now I want to simply dismount DB from exchange 2010 and copy DB and Logs from that old server to new Exchange server 2013 . Then I simple execute mount command. Can it be done?

  3. Tuna

    Wow, thank you so much Paul!! You really helped me so much with this article. Very well written and to the point. Thanks again and keep up the excellent work.

  4. mohammad

    Hi,

    I think one small step need to b added i.e. to rename the database as newly created database and then copy to final location

    Thanks

    mohammad

  5. Bamkele

    Hi Paul

    I did the mailbox moves to the other server into a new DB. Now what I’m left with is the Arbitration mailboxes do I move these mailboxes aswell into the new DB?

      1. Bamkele

        Thanks Paul

        Does it matter if the Build version of new Exchange 2013 SP1 (CU11) Server is higher than the server that we want to decommission which is running on Exchange 2013 SP1 in the same Org?

          1. Bamkele

            Thanks Paul appreciated!

  6. Bamkele

    Hi Paul

    Makes sense thanks again I will give it a try.

  7. Bamkele

    Thanks Paul

    Won’t that affect the user’s outlook connectivity in the process?

  8. Bamkele

    Hi Paul

    Thank you so much for the well written article. My question does the same steps apply to move a mailbox from one Exchange 2013 SP1 to another Exchange 2013 SP1 server?

    Your reply will be highly appreciated.

      1. Bamkele

        Thank you so much Paul.

        Actually what we want to do is to move the mailbox from a 2013 server to another 2013 server within the same organisation and decommission the other server.

        Will it still work in this case?

  9. Péter Földesi

    Hi,

    It is an excellent guide! Thank You very much! You saved my life 🙂

  10. BJ

    Hi Paul – thanks for the great article, it walked me through everything I needed to do to get our environment restored.

    This DR event is unique in that the unavailable Exchange server will be brought back online in the next few days (city-wide power outage.) We recovered Exchange from a backup – unfortunately the backup was a business day behind.

    My question is, when the Exchange server comes back online what would be the best method to merge the gap of data between the restored version of the database and the database of the server that was offline? Would a Recovery Database work best for this? Is there any danger of bringing that old server online, as it still thinks it is hosting those users mailboxes? We will want to also move the mailbox database back to the original server.

    Thanks for any insight you can provide.

  11. jack roberts

    Excellent guide. Very detailed. This saved a DR test with a failed DAG node. I took the edb after removing the dag from asdiedit as last resort still didn’t allow me to mount the local db. I resorted to this method and it worked well. Allowed me to mount the local edb from the dag as a new database.

    Now we plan to move away from the DAG for DR as I don’t think its designed for that sort of scenario.

    Thanks!

  12. nithyanandham

    Thanks a lot for your immediate response.

    1.)One more thing i need to clarify ,On this article you are running a command (Get-Mailbox -Database MB-HO-01) , and that command is giving you an output with list of mailboxes available on that database .I just wanted to clarify how that command is giving an output for unavailable database? and on our next step you are redirecting the mailboxes from that crashed database to the newly created database

    Because why i am asking you know , In our case already the server which is holding that database is already crashed . Will that command is reproducing the output by utilizing the database entry which is present on configuration partition of Active directory ?.Please correct me if i am wrong .

    2.)Could you please share me your article which states about Dial Tone Portability in exchange 2010 ?

    Thanks
    S.Nithyanandham

  13. nithyanandham

    Hi paul ,

    Thanks a lot for a wonderful article.

    Just i wanted to clarify few of my doubts, Do i need to create the new database with the .edb file prefix name as same as the .edb file name which is present on LUN or it is going to be restored from backup ?

    Same time on this article you have mentioned like below ….

    Copy the database and log files from their current locations into the locations that you specified when creating the new mailbox database.

    As per my knowledge , what i understood is – we should have to overwrite the newly created .edb file and log files with the restored .edb file and log files .Please Correct me if i am wrong .

    Could you please share me your article link which states about Dial Tone Portability in exchange 2010 ?

  14. Diego

    Hi Paul,

    In he process of testing your post when I try to do the “>Get-Mailbox -Database ” I get a prompt as response, any clue about why I cant see the content of the DB ?
    FYI : DB is in clean shutdown state.
    Thanks in advance!!!

  15. Jason

    Hi Paul

    thank you so much for detailed steps.. your tutorial is way much better and easier to understand compared to MS.technet tutorial which is not reader friendly (most of the time)

    Thank again 🙂

    Regards
    Jason

  16. Joseph Colvin

    Thank you so much!
    Writing this saved my exchange server… we only have the logs and dbe file to go off of.
    I did have to force the dbe file to transition to clean shutdown state, which meant that we lost some info.
    I than found that I couldn’t re-link everyone’s email accounts… something in AD caused it to say it was ‘an invalid primary mailbox’.
    What I did was
    Get-Mailbox -ReadFromDomainController | Set-Mailbox -Database RecoveredExchangeDB
    And all is well again!

  17. Martin

    Hi Paul,
    i have big trouble. My old SBS 2011 is completely crashed and i have only the .mdb. Is there a way to recover the old Exchange-Data to the new SBS 2011 Installation with same name/users/domain etc.pp.?

    1. Avatar photo

      Database portability works if the server(s) are part of the same Exchange organization. So you could try it, if you’ve recovered your AD forest and Exchange org, and see how it goes.

      Otherwise you’d need to look at third party recovery tools like Ontrack Powercontrols. Beware though, that sector of the software market is full of low quality, scammy products that may or may not work. Ontrack is the only one I’ve personally ever used and it worked for me.

  18. voffka

    sorry for that many comments. My goal is to move mailbox to another server in organisation. Now i see that my “FROM” server is hosting my database (that is umnounted). And TO server is hosting my new database, that is mounted. The question is about content of mailbox. Is it will be missed now ? can i delete safely database from my FROM server ?

      1. voffka

        i see now. Ok. Maybe you can sujjest something about moving mailbox databases between servers in organization ? as for googling this only pointing for this portability … 🙁

        btw. thanks for a great articles. It is really awesome.

        1. Avatar photo

          Database portability is a method for moving entire databases between servers, however I only consider it to be a disaster recovery option not an option for planned migrations.

          If you want to move mailboxes from one server to another you should do that with normal mailbox move requests.

          More reading:
          https://www.practical365.com/move-mailboxes-exchange-server-2010/

  19. voffka

    after this manipulation non cached mode is now working for me …

    1. voffka

      it is says that my mailbox was moved to temporary location. and to choose if to use a new location or previous. both not connecting

  20. voffka

    how about the content of mailboxes ? how it knows that it must be copied to a new database ? or it will be missed, like it warns in set-mailbox command ?

  21. Alex

    Thank you for the article. I followed the steps and have ben able to mount and recover the database on another server. Users are rehomed and email is flowing, but now there are a bunch of “stuck” completed move requests listed. I can’t clear the move requests. Error says “Unable to make connection to server…”. How can I clean up these completed move requestes now that the source server is gone?

  22. benjamin

    for a drp setting ad intact, cas also intact. mailbox mounted following the process above. the challenge now is that cas in powershell could see mailbox recovered but not included in its mailbox

    Please advice on what to do

    Thank you

    Benjamin

  23. Pham Trung Duc

    Hi Paul, I wonder that what does “◾the mailbox database can only be mounted on another Mailbox server within the same Exchange organization” means???

    In my scenario, my company have an exchange organization with domain name DOMAIN.com. But now, we want to shutdown this Exchange 2010 Organization and build a totally new exchange server 2010 organization wit the same domain name DOMAIN.com, the only thing we save is the Mailbox Database .edb file. So with your opinion, could I copy the .edb file from the OLD Mailbox server to an Storage device and copy, mount it on a NEW Mailbox server following your instruction.

    Thanks and Regards !
    Pham

    1. Avatar photo

      An Exchange organization exists within an Active Directory forest. So it depends if your new domain is part of the same forest, or an entirely new forest, whether the domain is still part of the same Exchange organization.

      If your domain is in a new forest, and therefore a new organization, then you can’t use database portability.

      I will also stress that this is primarily a disaster recovery feature, not a migration method to get mailboxes from one server to another in a planned migration.

      1. Pham Trung Duc

        My Domain is in a new forest totally, it has no relationship with the old domain controller except that it has the same name: DOMAIN.com
        So Could you help me to find an optimize migration solution?
        In my point of view and from what I have search, these are steps that I will deploy:
        1. Create mailbox or mail-enable existing user from .csv file using shell script
        2. On OLD Mailbox server: Export mailbox database per user using New-MailboxExportRequest command.
        3. On NEW Mailbox server: Import mailbox database per user using New-MailboxImportRequest command.
        Did this solution is possible and optimize for my company’s scenario?
        Thanks Paul so much 🙂

        1. Pham Trung Duc

          Thanks you so much Paul 🙂

  24. David

    Hi Robert, very good article. I have a question about Outlook 2003 (cached or not cached) clients: you say
    “Outlook 2003 clients will require a manual profile update to connect to the new database”, but using separate CAS server, also Outlook 2003 clients use it so, moving in this way a database from one mailbox server to another mailbox server, of the same AD site (therefore the same CAS server for clients) does not change Outlook 2003 profile. Is it correct? Have you tested this scenario?

    Thanks
    Regards

    David

  25. Zeeshan Butt

    Hi Paul,

    Really nice post very useful information. I have one query what if i lost my archive mailbox database. How to update attributes for those user accounts to point to the new archive mailbox database.

    Thanks in Advance.

    Regards,
    ZB

  26. waqas

    Thanks man it was really helpful

  27. Omar

    Hi Paul,
    I have the same case as Raphael,
    Our archive DB is on a SAN and it’s connected to the server EXCH1 via a iSCSI target,
    we have switched the connection to server EXCH2, but the database status shows “ServiceDown”.
    Do above steps apply also in that case? Is it necessary to do the final step “Rehoming” as this DB contains the personal archives, and how it will enable every personal archive to its right mailbox ?

    Thank you for your help.

      1. Omar

        Hi Paul,
        I have followed your steps, and at the end, I didn’t do the rehoming, as this mailbox DB is used for the archive, instead, I have changed these attributes manually from Active Directory of one test user :

        attributes: “msExchArchiveDatabaseLink” to point the new DB and “msExchDisabledArchiveDatabaseLink” to point the old DB.
        you might also change “msExchArchiveGUID” and “msExchDisabledArchiveGUID” and switch their values,
        Connected again to the user mailbox and the Personal archive has open,
        Thank you

        1. Zeeshan Butt

          Hi Omar,

          Can you please let me know how to change the attributes. I am also going from this condition. Your help will be appreciated.

          Thanks & Regards,
          ZB

        2. Omar

          Hello Zeechan,
          May be it’s a too late answer, but it could be helpfull for others too.

          To see these attributes, from your Exchange server, open the ADSI Edit (Start > Admin Tools).
          Once opened, if it’s not connected, right-click on the ADSI Edit from the left pane and select Connect, then enter your domain name and click OK.
          Now your complete domain tree will be show in the left pane, expand and navigate to the OU where your user is, and right-click on the user and select Properties, there you can find all the attributes.

          Hope this help.

          Thanks

      2. Sean C

        Paul, et al:

        … in a DB portability scenario for recovery, how are in-place/online archives handled?

        I have successfully used this scenario for primary mailbox DB’s but the in-place archive does not re-home.

  28. Raphaël

    Hi Paul,

    Thanks for your article. However I have a question.

    I tried to do that on dedicated Archive databases.
    MDBAR01 transferred from server1 to server2 with a new name : MDBAR01-Recovered.
    My problem is that they are only archive mailboxes on this DB.
    So I cannot find how to set this archivemailboxes to be setted on MDBAR01-Recovered instead of MDBAR01.

    Any idea ?

    Thanks,
    Raphaël

  29. Robert

    Sorry that worked perfectly! My apologies. I changed the database name (from labdatabase01.edb) to labdb01.edb – and then wondered why it was blank!

    Thanks again!

    1. Hugo Rondon

      Hello Robert I followed all the steps indicated in the tutorial but in the end I got the empty DB.

      Can you please tell me what you did to make it work for you?

  30. Robert

    This doesnt work when trying to recover the database! Or when moving a database from one server to anohter. All it does it create a new blank database (with no data) – called recovered!

    How is this useful?

    Robert

      1. Corne Kruger

        Do i need to rename the original database to what i called the new database? since the original database does not include the word “recovery”

  31. Lucas

    Hello, Paul.
    Thanks for the Tutorial, it’s very clear and well explained.

    I don’t tried to do this kind of procedure on EX2010, but in 2007 I remember that we can use the Move-Mailbox with the -ConfigurationOnly parameter to point the Mailboxes to the new Database path.

    It’s important to say that the -ConfigurationOnly was removed from the EX2010 version, and now we use the Set-Mailbox -Database (like you did in the last part of the text).

    All the details were explained in this link:
    http://blogs.technet.com/b/nawar/archive/2010/05/03/what-happened-to-configurationonly.aspx

Leave a Reply