How to move all mailboxes from one database to another?
In Exchange Server, we can create multiple databases to separate mailboxes to create policies, share quotas, spread them across different disks for performance reasons, and other reasons. These things are created during the installation of Exchange Server, for example when setting up a new Exchange Server. As the business grows or its requirements change, they will need to be updated or modified.
How to move all mailboxes from one database to another?
Here are the topics we’ll cover to help you move mailboxes between databases.
- Move all mailboxes at once
- Checking the status of a move
- Restrictions
- Alternative Solution
The standard version of Exchange Server allows a maximum of five databases, while the Exchange Server Enterprise license allows you to have an unlimited number of databases. However, it depends on the needs of the business and the cost of the license.
Here we’ll walk through the process of moving all mailboxes from one database to a new database on an Exchange server, especially if you’ve set up a new Exchange 2019 server.
Move all mailboxes at once
First, we need to understand what we have and what will be transferred. To move one mailbox from one database to another, we can use the New-MoveRequest command. However, in order to move all mailboxes at once, we need to get a list of all mailboxes first. For each mailbox, run the following command to run a move request to the target database.
Get-Mailbox -Database "<исходная база данных>"-ResultSize Unlimited | New-MoveRequest -TargetDatabase "<база данных назначения>"
This will go through all mentioned databases and move each user’s mailbox to the target database. The disadvantage of this operation is that if there are many mailboxes with huge data, it will eat up server performance and storage performance.
Since all mailboxes will be moved at once, this will create a huge load on the server. Even if the server has high performance with SSD drives, it will still consume all the resources, which can degrade server performance and ultimately limit user access.
To move public folders, we need to modify the command by adding the PublicFolder parameter to the Get-Mailbox statement.
Get-Mailbox -Database "<исходная база данных>"-PublicFolder -ResultSize Unlimited | New-MoveRequest -TargetDatabase "<база данных назначения>"
Checking the status of a move
To check the status of a move request for all users in a database, we need to use the Get-MoveRequest PowerShell command in the Exchange Management Shell (EMS).
Get-MoveRequest
Clear move requests
After the mailbox move is completed, the request is not removed from the Get-MoveRequest list. We need to run the following command to remove completed move requests.
Get-MoveRequest -MoveStatus завершено | Удалить-MoveRequest-Подтвердить: $false
If we run the Get-MoveRequest command again, we will only see the ones that succeed or fail. This will make it easier to troubleshoot any failed mailbox moves.
To remove failed requests, we need to run the command given below.
Ошибка Get-MoveRequest -MoveStatus | Удалить-MoveRequest-Подтвердить: $false
Limitations of the above method
With the above method, we can move all mailboxes to another database using the Exchange Management Shell (EMS). However, this has a few limitations and restrictions.
Using this method, we will create a large bottleneck on the server. Since all mailboxes will be moved at the same time, we cannot be selective or move mailboxes at a constant pace.
Additionally, we may run into issues when trying to move archived users, archived shared mailboxes, and disabled mailboxes. We need to reactivate disabled mailboxes in order to move them. This will require creating a new Active Directory user and associating the user with the disabled mailbox.
With the above method, we will not be able to move from one Exchange Server environment to another. This will only allow you to move to a different database on the same server, or to a different server in the same Exchange infrastructure.
Alternative solution – use a third party app
With applications like Stellar Converter for EDB, you can open multiple EDB files from any version of Exchange Server – from 2007 to 2019. You can browse databases without size limits and perform detailed exports to PST and other formats. With this EDB to PST converter, you can easily export mailboxes, system mailboxes, archives, shared mailboxes and shared folders.
You can export directly to live databases of any version of Exchange Server. It offers features such as parallel export to optimize performance, priority export for important mailboxes, export continuation if interrupted, and automatic/manual mapping of users from source to destination. It can also be a migration tool from on-premises Exchange to Office 365.
Leave a Reply