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.

Here’s an example from my test server:

[PS] C:\>Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

Name          : Mailbox Database 2116642217
EdbFilePath   : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database 2116642217\Mailbox Database 2116642217.edb
LogFolderPath : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database 2116642217

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 2116642217” is not desirable so I will rename it to “DB01” instead.

[PS] C:\>Set-MailboxDatabase "Mailbox Database 2116642217" -Name "DB01"

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

[PS] C:\>Move-DatabasePath DB01 -EdbFilePath D:\DB01\DB01.edb -LogFolderPath E:\DB01

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.

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. Chimwemwe Mtonga

    Please assist i am trying to move my mailbox database to a different location. i have manage to dismount the DB but when i run the comment i got the error below.

    ArgumentException
    + FullyQualifiedErrorId : [Server=Mail,RequestId=d90e0aa2-4f0f-4090-be0a-dee58280c431,TimeStamp=12/2/2020 10:35:
    53 AM] [FailureCategory=Cmdlet-ArgumentException] CABB1FC5,Microsoft.Exchange.Management.SystemConfigurationTasks.
    MoveDatabasePath
    + PSComputerName :

  2. CoolBreeze

    Great, simple instructions. Thanks

    I created the destination folder already and moved the database and logs ok.

    I find I now have access to browse and modify the database and logs folders whereas by default the Mailbox folder is owned by System and logged on users don’t normally have access to it.

    Is it ok to change the folder permissions to allow only System access?

  3. Michael

    Tried this command, and got the error,

    Failed to connect to target server “ExchangeServer”. Error: WMI exception

    Apparently, there are too many log files to move the database and log files. So the number of log files is filling up the disk, but the number of log files prevents you from moving them to a larger drive, a lose, lose situation.

  4. Robert Palmer

    Paul,
    Thank you for the great information. I know this doesn’t apply to db’s in a DAG environment. I am in a DAG environment which is new to my skill set. My question isn’t about the db’s. I just want to move the log files. They are currently on the same drive as the db’s. I want them on their own drive. Will your process work in that scenario? Basically dismount the db and run the following:

    [PS] C:\>Move-DatabasePath DB01 -LogFolderPath L:\Logs\DB01

    Thank you for your help!

  5. Gazi Asif Mohammed Islam

    Dear Paul Cunningham,

    i am going to deploy exchange server 2016 in production area. Before doing that, I have some quires regarding implementation,

    1. How many users mailboxes are able to archive in exchange server 2016 ? What is the standard?
    2. What band we should follow for archiving ?
    3. What are the standard retention period of mail in exchange server 2016?

  6. Myagi

    Paul,

    I have 2 Exchange servers and I am trying to relocate the database on the second server to a new folder. When I run the commands above I get an error message stating the database is not found on the first server.

    What additional parameters do I need to add to Set_MailboxDatabase to be able to relocate the the DB on the second server?

  7. Marius

    hi Paul can i move a mailbox database in exchange 2016 and keep the current location of the logs?
    log location is good database location is bad , will outlook 2016 clients with mailboxes in the moved database work normally after the move or need a new profile etc? does this move of the database also move the index of the database?

    1. Paul Cunningham

      Yes you can move them independently.

      No the users won’t need new Outlook profiles.

      The index should move with the database.

      Consider creating a new database in the correct paths and moving the mailboxes instead. Moving a database involves downtime. Moving mailboxes is nearly zero downtime.

      1. Hardik Kalal

        Hello Paul,
        I have two exchange server running with their respective domain (separate domain) i want to merge all this mailboxes in to one exchange server. i will later add that domain into accepted domain in exchange server.
        How can i migrate or move this mailboxes ? can you please advise

  8. Joel Fdez

    I have exactly the same question as Ahmed from March 7, 2018 related to moving the database folders to another location, however we can’t seem to be able to move the index folder. Do you have any suggestions for this? thanks.

    1. Fred Brown

      Hi Joel,

      You may already have an answer to this but the technique I’ve used is to stop and Microsoft Exchange Search service, delete the folder in its old location and the restart the service

  9. Don Logan

    Ok…I have got to be missing something…will review my environment and hopefully pull my cranium out of my posterior. Thank you for your prompt response.

  10. Don Logan

    These commands just do not work for me. I am getting similar error to ‘Jeff’ from March 2016’…above who apparently got no answer…other than the DB must not exist. The DB does exist in the default location.
    Its apparent that something has been left out of the instructions…. Is there any other way to perform this task?

    1. Paul Cunningham

      Jeff got an answer. He never came back with further information so I can only assume he worked out what was going wrong.

      The instructions are complete. You haven’t provided any information about the exact commands you’re running. If you can run Get-MailboxDatabase and see the exact database name, then the move command should work with that same name.

  11. Ahmed

    moving the default database in this way does not move the content index folder?

    i installed a new exchange 2016 server than used these commands to rename&move the default database. The move completes but the index folder is not present on the new path.

  12. Abdul Saboor

    Thank you, very helpful

  13. Gian Luca

    Many Thanks 🙂 for informations

  14. Rae

    May I ask if there is a way to migrate OLD exchange 2016 mailboxes to NEW Exchange 2016 Mailbox?

  15. Rae

    Hi Paul,

    I am new to exchange community. Our office will be moving to another place. Our boss wants to refresh all our Microsoft Services including Exchange 2016.

    is this method applicable for our concern? Can you help me with this kind of scenario?

    Thanks!
    Rae

    1. Paul Cunningham

      This article doesn’t relate to your scenario. Sounds like you either need to plan for a physical move of your servers to the new office location, or plan for a migration of your Exchange server to a new server. Either way, if that is not something you’re comfortable with then I recommend you find a local consultant who can help you.

      1. Rae

        But can I use this method to migrate the mailbox databases from our old Exchange 2016 to New Exchange 2016?

        1. Paul Cunningham

          No, this is not a migration method. If you want to migrate mailboxes there is instructions available on Technet or via Google for how to perform mailbox moves with Exchange.

          1. Rae

            Thank you very much!

  16. Siddhpal Patel

    Hi Paul,

    In our case exchange server 2016 was setup almost 8 months back at that time person available used default location for database and log. To surprise no backup has been taken till now. I noticed drive filling up very fast. I added new HDD and moved mailboxes newly created database. To move log files which method should i adapt.
    1. Dismount database and move the log file manually to other location. or
    2. Run power shell command. Here i am unsure how to include all log file.ext.

    If you can provide guidance. It will be great help. We can not afford to have much downtime.

    Regards
    Siddhpal

    1. Paul Cunningham

      I’m confused about your question. If you’ve already moved the mailboxes to a new database, why do you also want to move the log files for the old database?

  17. Suresh

    Hi Paul,

    I have an Exchange Server 2016 running and I want to configure DAG and for that I installed another Exchange 2016 on another server. I would like to know whether to move the default database location to new location may down the existing running Exchange Server or not. Will it cause any outage for the live Exchange Server? Thanks

  18. Suresh

    Hi Paul,

    I have an Exchange Server 2016 running and I want to configure DAG and for that I installed another Exchange 2016 on another server. I would like to know whether to move the default database location to new location may down the existing running Exchange Server or not. Will it cause any outage for the live Exchange Server? Thanks

  19. Jeremy Davis

    Great help – thank you!

  20. steven yu

    Hello Mr. Paul
    My exchange mailbox databases that are being replicated to multiple DAG members. After I dismounted them and moved them to D drive, the server event reminding me 1564, 1177 , 1135 error message,
    I have two exchange are being replicated to multiple DAG members. How to fix this problem.
    Thank you for your help in advance.

    1. Paul Cunningham

      I don’t know what those event numbers are, unless you share the full error information.

      But before you do that, I wrote in the article that moving a database like this shouldn’t be done for databases hosted in a DAG. If you want to move databases in a DAG to a new folder path, it’s better to create a new database, set up the database copies, and then perform mailbox moves.

      1. steven yu

        I’m sorry to let you know that before read you article I have moved my 2 exchange2013sp1 servers mailbox folder (not include user pst data) to D drive.

        And I have two error as below need your help, thanks a lot. Maybe you can kindly give me the advice or solution to fix them. Currently I’m not sure whether i f they have affected my server running.

        Event 4138″
        Some databases on server TTMSEXCH have insufficient data redundancy.

        Databases:

        Mailbox Database 0306853485

        Mailbox Database 0306853485 – There were database redundancy check failures for database ‘Mailbox Database 0306853485’ that may be lowering its redundancy and putting the database at risk of data loss. Redundancy Count: 1. Expected Redundancy Count: 2. Detailed error(s):

        XXXXexch:
        Database ‘Mailbox Database 0306853485’ does not have enough copies configured to meet the validation criteria.”

        Event 4374″
        Database availability health check failed.
        Database copy: Mailbox Database 0306853485
        Redundancy count: 1

        Error: There were database availability check failures for database ‘Mailbox Database 0306853485’ that may be lowering its availability. Availability Count: 1. Expected Availability Count: 2. Detailed error(s):

        XXXXexch:
        Database ‘Mailbox Database 0306853485’ does not have enough copies configured to meet the validation criteria.

        ================
        Full Copy Status
        ================

        —————-
        Database Copy : Mailbox Database 0306853485XXXXexch
        —————-
        WorkerProcessId : 10684
        ActivationPreference : 1
        CopyStatus : Mounted
        Viable : False
        ActivationSuspended : False
        ErrorEventId : 0
        LastStatusTransitionTime : 1/1/0001 12:00:00 AM
        StatusRetrievedTime : 12/8/2016 5:07:18 AM
        InstanceStartTime : 12/8/2016 3:21:49 AM
        LowestLogPresent : 0
        LastLogInspected : 0
        LastLogReplayed : 0
        LastLogCopied : 0
        LastLogCopyNotified : 0
        LastLogGenerated : 0
        LastLogGeneratedTime : 1/1/0001 12:00:00 AM
        LastCopyNotifiedLogTime : 1/1/0001 12:00:00 AM
        LastInspectedLogTime : 1/1/0001 12:00:00 AM
        LastReplayedLogTime : 1/1/0001 12:00:00 AM
        LastCopiedLogTime : 1/1/0001 12:00:00 AM
        LastLogInfoFromClusterGen : 0
        LastLogInfoFromClusterTime : 1/1/0001 12:00:00 AM
        LastLogInfoFromCopierTime : 1/1/0001 12:00:00 AM
        LastLogInfoIsStale : False
        ReplayLagEnabled : Unknown
        ReplayLagPlayDownReason : None
        ReplayLagPercentage : 0

  21. Robert Österlund

    You can remove this post as i no have had to restart the installation, but in short… the problem i had was that i could not move the DB1 as i was using a “remote server” although i was actually using the EX-01 or EX-02 to do the move.
    I will get back to you in this matter IF and WHEN i get the error again.
    Right now the servers are not even running Exchange installation due to some error so i need to solve that first.

    Thank you again for the great blog on how to install Exchange, it has helped me alot so far.

  22. Robert Österlund

    Hi
    Thanks for all the help setting our new EX2016 DAG environment… BUT!
    I get this stupid error:

    [PS] C:Windowssystem32>Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

    Name : DB01
    EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335Mailbox Database 1203173335.edb
    LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335

    Name : Mailbox Database 0844235906
    EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0844235906Mailbox Database 0844235906.edb
    LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0844235906

    Name : Mailbox Database 0480460219
    EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0480460219Mailbox Database 0480460219.edb
    LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0480460219

    [PS] C:Windowssystem32>Set-MailboxDatabase “Mailbox Database 1203173335” -Name “DB01”
    The operation couldn’t be performed because object ‘Mailbox Database 1203173335’ couldn’t be found on ‘DC-01’.
    + CategoryInfo : NotSpecified: (:) [Set-MailboxDatabase], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=EX-02,RequestId=087ac95d-7d4f-4541-be00-d20bd36cbfe4,TimeStamp=2016-09-27 13
    :06:11] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] D47D1B98,Microsoft.Exchange.Management.SystemCo
    nfigurationTasks.SetMailboxDatabase
    + PSComputerName : ex-02

    [PS] C:Windowssystem32>

    Any ideas on how to solve this?
    I got a second server (EX-01) and get the exact same problem there.

    1. Robert Österlund

      I also see now that i have managed to rename the DB, but failed the first time (with error no longer in window), cos i got this 🙂

      [PS] C:Windowssystem32>Set-MailboxDatabase “Mailbox Database 0844235906” -Name “DB02”
      [PS] C:Windowssystem32>Set-MailboxDatabase “Mailbox Database 0480460219” -Name “DB03”
      [PS] C:Windowssystem32>Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

      Name : DB01
      EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335Mailbox Database 1203173335.edb
      LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335

      Name : DB02
      EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0844235906Mailbox Database 0844235906.edb
      LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0844235906

      Name : DB03
      EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0480460219Mailbox Database 0480460219.edb
      LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0480460219

      And here i though it would actually rename the edb-file as well as the catalogue name 😉

      1. Robert Österlund

        and finally i get this:

        [PS] C:Windowssystem32>Move-DatabasePath DB01 -EdbFilePath D:DB01DB01.edb -LogFolderPath E:DB01
        This operation cannot be performed on a remote server. Please use the -ConfigurationOnly option and the
        the files.
        Parameter name: ConfigurationOnly
        + CategoryInfo : InvalidArgument: (DB01:ADObjectId) [Move-DatabasePath], ArgumentException
        + FullyQualifiedErrorId : [Server=EX-01,RequestId=d6d34ace-846c-4005-8e69-1107109afe00,TimeStam
        :13:24] [FailureCategory=Cmdlet-ArgumentException] 6DF879DA,Microsoft.Exchange.Management.SystemConf
        .MoveDatabasePath
        + PSComputerName : ex-01

        i get this error on both servers (ex-01 and ex-02). in some places, where the name is EX-01 it is not written as FQDN. but when it says ex-01 it is as FQDN (i removed that info from my post)
        could there be an issue with that?

        1. Robert Österlund

          very sorry for the looooong post…

          [PS] C:Windowssystem32>Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

          Name : DB01
          EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335Mail3173335.edb
          LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335

          Name : DB02
          EdbFilePath : D:DB02DB02.edb
          LogFolderPath : E:DB02

          Name : DB03
          EdbFilePath : D:DB03DB03.edb
          LogFolderPath : E:DB03

  23. Mike Zapke

    After i renamed the DB moved the it. I get a warning for the “Administrator” Mailbox.
    “‘Database’ ist für ‘UserMailbox’ verbindlich.” -> Database is necessary for UserMailbox
    I think the Admin Mailbox was already there before i moved the db and cant find its database now.
    I dont have any Mailboxes yet, installed fresh ex2016cu3

    1. Mike Zapke

      Had to delete the Administrators Mailbox and add it again

  24. Praveen Kumar

    Hello Paul,

    Cross forest mailbox move from Exchange 2013 to Exchange 2016 is offline move or online move?

    Thanks,

    Praveen

  25. Shahid Mushtaq

    You are true Exchange Hero!!

  26. johnny s

    Paul,
    Getting a similar error as Jeff. Changed the DB name as you mentioned to DB01, and ran:

    Move-DatabasePath HCMSX -EdbFilePath C:ExchangeDatabasesDB01 -LogFolderPath C:ExchangeDatabasesDB01_log and the error I get is:
    The operation couldn’t be performed because object ‘HCMSX’ couldn’t be found on ‘PDC Server Name’

    I triple checked, and the Server is on the DOmain and in Active Directory. Any ideas?

  27. Jeff

    Trying to run these commands on a newly installed Exchange server. I have 2 servers in the domain right now. A domain controller and the exchange server. The exch server says everything is installed to the exch server. When I run the command I get: “The operation couldn’t be performed because object ‘Mailbox Database xxxxxxxxx’ couldn’t be found on ‘server.xyz.com’. Server xyz being the domain controller, not the exchange server. Any ideas why it would be looking to wrong server? DNS is setup and working correctly.

    1. Paul Cunningham

      The domain controller is in the error because Exchange tools look up objects in Active Directory.

      Most likely cause is the mailbox database you’re specifying doesn’t exist. Maybe a typo. But you haven’t said exactly what the command is you’re running, nor whether you’ve double checked that the mailbox database name is correct.

  28. Xavier Fárez

    Good day,

    I have a database Exchange 2010 supports 2016, I have a new server running Exchange 2016 as the base from 2010 to 2016 migrate, you can use the same base: Move-DatabasePath

    1. Paul Cunningham

      No, you can’t use Move-Database path to move an entire database from Exchange 2010 to Exchange 2016.

      1. Xavier Fárez

        Thank you, what would be the proper methodology to migrate between these versions

        1. Paul Cunningham

          A server/mailbox migration. You’ll find it is basically the same migration process as going from 2010 to 2013.

Leave a Reply