Moving a Mailbox Database Path

In Exchange 2007 and Exchange 2010, added functionality in Move-Mailbox (and New-MoveRequest), along with the support of online mailbox moves, have reduced the requirement of moving entire databases around very much (it’s easier to just move all the mailboxes in the mailbox database to a new mailbox database in the proper location).

But sometimes – you just need to do it. Even with the downtime it may cause.

You CAN do it from the Exchange Management Console or from the Exchange Management Shell. However, the provided status information is worthless. You have no idea how far along the data movement is. What I recommend instead is this process:

  1. Dismount the mailbox database
  2. Use ROBOCOPY to copy the database file from the old location to the new location
  3. Use Move-DatabasePath -ConfigurationOnly to update Exchange with the new location of the database
  4. Mount the mailbox database

In pseudo-PowerShell:

  1. dismount-database <dbname>
  2. robocopy <src-dir> <dest-dir> <dbname>.edb
  3. move-DatabasePath -Id <dbname> -ConfigurationOnly -EDBFilePath <new-full-path-to-edb>
  4. mount-database <dbname>

ROBOCOPY provides excellent information as to the status of a filecopy.

Also note that “ESEUTIL /y” is a good solution for copying large files as well. It provides respectable filecopy status information.

Until next time…

If there are things you would like to see written about, please let me know.

Edit November 22, 2010 – I’m extremely embarassed. In the original version of this post I used “unmount-database” (which doesn’t exist, of course) instead of “dismount-database”. Thankfully, only a few dozen people pointed out my error to me.

Follow me on twitter! : @EssentialExch

Leave a Reply

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