Tutorials

How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive

How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive

One of the things you should always check is that you have enough place to start a migration from an older Exchange Server version to Exchange Server 2013 or 2016. It is considered best practice to have Exchange Database and Logs not on the partition where the Exchange binaries are stored, most of the cases this is also the system partition. In my lab setup I have added two drives and set them to D: and E:. I labeled D as Exchange Database and E as Exchange Logs.

  1. From the Start Menu start an elevated Exchange Management Shell.
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive
  2. Type Start-Transcript c:\Move-Mailbox.txt or any name you want to use. What happens is that all output is written to that file and we will use that to create the actual Move-DataBasePath command later on.
    Start-Transcript c:\Move-Mailbox.txt
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive
  3. With Get-MailboxDatabase | FL Name,EdbFilePath,LogFolderPath we can see where that database and logfiles are stored. In our case this is on the System drive and we want to change that.
    Get-MailboxDatabase | FL Name,EdbFilePath,LogFolderPath
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive
  4. Type Stop-Transcript to stop recording. The Output is saved to the file you defined.
    Stop-Transcript
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive
  5. Type notepad.exe c:\move-mailbox.txt
    notepad.exe c:\move-mailbox.txt
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive
  6. The transcript opened with the Output of Get-Mailbox. We can now use this and copy and paste stuff when we build our Move-DataBasePath command.
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive
  7. I have build my Move-Databasepath command using copy and paste from the output of Get-MailboxDatabase and I set the –EdbFilepath to the same path as the original but to drive D: and I changed –LogFolderpath to E:. You don’t need to create that folder structure as this is done when you run the Move-Databasepath command. You can also use some other path if you wish, it is up to you but I always stick to this method.
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive
  8. With Move-Databasepath we will set a new –EdbFilepath for the Database and with –LogFolderpath for the Log files. Hit [A] twice for All.
    Move-Databasepath "Mailbox Database 0708098983" -EdbFilepath "D:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database 0708098983\Mailbox Database 0708098983.edb" -LogFolderpath "E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database 0708098983"
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive
  9. After the Move has been completed we can check with Get-MailboxDatabase | FL Name,EdbFilePath,LogFolderPath the new locations.
    Get-MailboxDatabase | FL Name,EdbFilePath,LogFolderPath
    How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive

Join our community.

Excellent content,
great people!

Like what you see? Join us for free*

Subscribe and receive ‘how to’ and ‘best practice’ articles on server and cloud maintenance, design and troubleshooting.

  • Monthly newsletter with a summary of all new tutorials
  • Get an email as soon as a new tutorial has been published

About www.server-essentials.com 

www.server-essentials.com is founded by Mariette Knap, a Dutch Microsoft MVP. www.server-essentials.com is a community for IT Consultants and Business Owners who, themselves, take care of the IT infrastructure and Employees who do that little extra in the company to keep things running. Our forum is for discussing all things ‘IT’ and more.  Our documentation is top notch and written by and for the community.


Project Image
Contact Us
(030) 2250455

International: +31302250455

 

Concentrix BV

C. de Rijcklaan 1

3723 PM Bilthoven

The Netherlands

KvK 30202318

VAT Id 814036739B01