Move Exchange 2013 Database File and Log Folder Paths

Need to move Exchange database and/or log files to a new location? Below are a few simple commands (and some references) to make it happen.

NOTE: Moving an Exchange database and log files must be performed from the Exchange Management Shell (EMS). These steps currently cannot be performed from the Exchange Admin Center (EAC).

First, let’s get some specific information about the databases that might already existing in the environment to help us with moving. Running this command will tell us where a specific database and log is located to prepare us for a move.

Get-MailboxDatabase -Identity <DatabaseName> | FL Name, ServerName, EdbFilePath, LogFolderPath

This command will provide the same information as the previous command but will display info about all of the databases in our organization…

Get-MailboxDatabase | FL Name, ServerName, EdbFilePath, LogFolderPath

NOTE: Moving the database(s) and/or log files will require the mailbox database to be temporarily dismounted. All mailbox users will lose connectivity during this time.

Move Database

Move-DatabasePath “Mailbox Database X” –EdbFilePath “X:\Exchange Databases\Mailbox Database X\Mailbox Database X.edb”

Move Logs

Move-DatabasePath “Mailbox Database X” –LogFolderPath “X:\Exchange Logs\Mailbox Database X\”

Move Database and Logs

Move-DatabasePath “Mailbox Database X” –EdbFilePath “X:\Exchange Databases\Mailbox Database X\Mailbox Database X.edb” –LogFolderPath “X:\Exchange Logs\Mailbox Database X\”

NOTE: After moving a database and/or log files the source folder and subfolders remain. It will be safe to delete these folders after the databases and log files have successfully been moved.

Reference(s):

Advertisements

4 thoughts on “Move Exchange 2013 Database File and Log Folder Paths

  1. Thanks for sharing this informative blog post.
    In my situation, due to not much technical expertise, I have used Lepide exchange manager to move the database on new server and free some spaces into old exchange server.

  2. Hi Todd and thank you for your post

    I’ve tried changing the Log folder path but got the error below

    This operation cannot be performed on a remote server. Please use the -ConfigurationOnly option and then manually move the files

    Can you perhaps assist

    Thank you
    Jabu

  3. Thank you! This was very helpful! I managed to create three new Xchange DBs and move one. I have now folders for each db and folders for log files. This makes it more clear. cheers from Frankfurt

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