Introduction
In the previous parts of this series, we’ve installed Exchange 2016,
configured certificates and virtual directory URLs and then migrated the CAS
role.
The next step in the migration will be to migrate data – namely creating
mailbox databases then moving mailboxes and public folders so we’ll cover that
in this post:
To read other parts in this series, go to:
- Exchange
2013 to 2016 Migration (Part 1) - Exchange
2013 to 2016 Migration (Part 2) - Exchange
2013 to 2016 Migration (Part 3) - Exchange 2013 to 2016 Migration (Part 5)
- Exchange 2013 to 2016 Migration (Part 6)
Rename and move default mailbox database
When we installed Exchange 2016, it installed a default mailbox database
which is stored on the C drive. Having a mailbox database on the C drive is not
a good idea as this drive should be reserved for just the operating system and
it’s generally quite small in most deployments.
To move the default database, first figure out it’s name by running this
command:
Get-MailboxDatabase -Server litex02
In our case, the database is called “Mailbox Database 1051570769”
We now rename the mailbox database. To rename the mailbox database to
MDB01-LITEX02, run this command:
Set-MailboxDatabase -Identity “Mailbox Database 1051570769” -Name
MDB01-LITEX02
We now need to move the database. Use the command below to move the database
EDB file to “E:Program FilesMicrosoftExchange
ServerV15MailboxMDB01-LITEX02MDB01-LITEX02.edb” and the logs to “E:Program
FilesMicrosoftExchange ServerV15MailboxMDB01-LITEX02”:
Move-DatabasePath -Identity MDB01-LITEX02 -EdbFilePath “E:Program
FilesMicrosoftExchange ServerV15MailboxMDB01-LITEX02MDB01-LITEX02.edb”
-LogFolderPath “E:Program FilesMicrosoftExchange
ServerV15MailboxMDB01-LITEX02”
You’ll be prompted twice – once to confirm you want to do this and the second
time to confirm that the database will be dismounted and mounted again. Select
yes for both prompts.
Create mailbox databases
The recommendation is to keep non-replicated mailbox databases under 200GB
and replicated mailbox databases under 2TB so this may mean you need to create
additional mailbox databases. Ideally a DAG is recommended but we’ll cover this
in another post.
We will create another mailbox database with the below settings:
- Name: MDB02-LITEX02
- Database path: “E:Program FilesMicrosoftExchange
ServerV15MailboxMDB02-LITEX02MDB02-LITEX02.edb” - Log folder path: “E:Program FilesMicrosoftExchange
ServerV15MailboxMDB02-LITEX02”
To do this, run the command below:
New-MailboxDatabase -Server litex02 -Name MDB02-LITEX02 -EdbFilePath
“E:Program FilesMicrosoftExchange
ServerV15MailboxMDB02-LITEX02MDB02-LITEX02.edb” -LogFolderPath “E:Program
FilesMicrosoftExchange ServerV15MailboxMDB02-LITEX02”
Once done, we need to restart the information store:
Restart-Service MSExchangeIS
Now that our new mailbox database is created, we need to mount our new
database:
Mount-Database MDB02-LITEX02
We’re now ready for the next step.
Move mailboxes to Exchange 2016
When moving mailboxes, note that this will generate a lot of log files due to
the amount of database changes so make sure that you have space for this and are
backups regularly enough to truncate the logs. The other option is to use
circular logging but this may have implications on your ability to backup your
Exchange server (see your backup documentation). It also means that should you
have a failure, you won’t be able to replay log files to bring the server up to
the point just before the failure.
You’ll need to move all the mailboxes to Exchange 2016 so this includes:
- Arbitration mailboxes (system mailboxes)
- Public folder mailboxes
- User mailboxes (this includes journal mailboxes)
- Archive mailboxes
Move Exchange 2013 System Mailboxes to Exchange 2016
When our Exchange 2013 server was installed in the organization, it created a number of system mailboxes (arbitration mailboxes). We can list these mailboxes and confirm that they are indeed on our Exchange 2013 server by running this command:
Get-Mailbox –Arbitration
We need to move all of these to Exchange 2016 so to do this, run the following command, specifying our Exchange 2016 mailbox database (MDB01-LITEX02):
Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase MDB01-LITEX02
You can confirm that the mailboxes have moved by running the command below:
Get-MoveRequest | Get-MoveRequestStatistics
Once these mailboxes are moved, we can move on to the next step.
Move public folder mailbox to Exchange 2016
Moving a public folder mailbox is much simpler now that we don’t need to worry about public folder replication as we did in the Exchange 2003 – 2010 days. It’s great that Microsoft have changed the architecture to make it more manageable.
First, get a list of public folder mailboxes on your Exchange 2013 server:
Get-Mailbox -Server litex01 -PublicFolder
Next, use this command to move the public folder mailbox to Exchange 2016:
New-MoveRequest PublicFolders1 -TargetDatabase MDB02-LITEX02
Move user mailboxes
There’s many different approaches to moving user mailboxes. You can move mailboxes
individually, by OU, mailbox database or just move all mailboxes in one go if
you don’t have that many.
When you use these commands, the user’s archive mailbox is used with their mailbox. If this is not what you want, you can use the -PrimaryOnly switch to move the mailbox only and then use the -ArchiveOnly switch to move the archive mailbox only. I’ll show you some examples:
Move a single user mailbox
To move a single mailbox to mailbox database MDB01-LITEX02, run this command.
This will move the mailbox and any archive mailboxes associated with it to the
same mailbox database.
New-MoveRequest Administrator -TargetDatabase MDB01-LITEX02
Move all user mailboxes in a particular database
To move all mailboxes in a particular database to a particular database (e.g.
from “Mailbox Database 0602826091” to “MDB01-LITEX02”):
Get-Mailbox -Database “Mailbox Database 0602826091” | New-MoveRequest
-TargetDatabase MDB01-LITEX02
Move a user mailbox but select a completion time
There’s also the option to move a mailbox but suspend it when ready to
complete. This enables you to ‘seed’ a move and then complete it quite quickly
out of hours if needed. Use the command below to start the move:
New-MoveRequest Administrator -TargetDatabase MDB01-LITEX02
-SuspendWhenReadyToComplete
When you’re ready to complete the move, then you can resume it using this
command:
Resume-MoveRequest Administrator
Move an archive mailbox without moving the user’s primary mailbox
Get-Mailbox finance2 | New-MoveRequest -TargetDatabase MDB02-LITEX02 -ArchiveOnly
Move a user’s primary mailbox without moving the user’s archive mailbox
Get-Mailbox finance2 | New-MoveRequest -TargetDatabase MDB02-LITEX02 -PrimaryOnly
Get move request status
Now that we have these move requests in progress, you can use this command to
get an update on progress:
Get-MoveRequest | Get-MoveRequestStatistics
Conclusion
In part 4 of this series, we’ve gone through the required steps to create
mailbox databases on our Exchange 2016 server and then move the system mailboxes, user mailboxes and
public folder mailboxes to our new server.
We’re now well on our way in the migration so let’s move on to part 5 where
we’ll migrate mail flow from Exchange 2013 to 2016 in preparation to
decommission our Exchange 2013 servers.