Moving an Exchange Server 2016 Mailbox Database

When Exchange Server 2016 is installed it creates a mailbox database for you on the server . If you installed Exchange to the default path then the mailbox will be stored in C:\Program Files\Microsoft\Exchange Server\V15\Mailbox.

You can use the Exchange Management Shell to move the database and log folder path in Exchange 2016.

Here’s an example from my Exchange 2016 server:

Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

The default location is probably not suitable for your environment, so you would likely want to move this database to the volumes that you’ve provisioned for your Exchange database and log files. Another common scenario is that the database is growing and the current volume is low on free disk space, so you want to move it to new, larger volume.

A mailbox database can be moved, but before you proceed consider that the move requires the database to be dismounted and taken offline, so it will not be accessible by your mailbox users during the move. This is fine if the server has just been set up and there are no mailboxes on it, but if you’re moving a database with active mailbox users a better option would be to create a new database on the new volume and perform mailbox moves (which are non-disruptive to end users).

I will also point out that the procedure below is not suitable for mailbox databases that are being replicated to multiple DAG members.

Before I move the database I am first going to rename it. The uniquely generated name of “Mailbox Database 1095174571” is not desirable so I will rename it to “DB01” instead.

C:\Set-MailboxDatabase "Mailbox Database 1095174571" -Name "DB01"

To move the database and transaction log files to their new locations we use the Move-DatabasePath cmdlet.

Move-DatabasePath DB01 -EdbFilePath D:\Exchange\V15\Mailbox\DB01.edb -LogFolderPath D:\Exchange\V15\Mailbox

The database is temporarily dismounted, the files are copied to the new locations, and then the database is mounted again. The time operation takes will depend on how much data there is to be moved, as well as the speed of the source and destination disks. Generally speaking, the more data you have the longer it will take, potentially becoming a very long outage for your users, hence why I recommend considering moving mailboxes to a new database instead.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s