Hi @Андрей Михалевский,
Welcome to the Microsoft Q&A platform!
Based on your description, you are doing a dial tone recovery for an Exchange database. Let's break down the process step by step for clarity.
- Yes, you should create a temporary database for each original database. For example:
- TEMPDB01 for DB01
- TEMPDB02 for DB02
- And so on, up to TEMPDB30 for DB30
- You need to redirect the mailboxes from each original database to the corresponding temporary database. Here are the commands for all 30 databases:
Get-Mailbox -Database DB01 | Set-Mailbox -Database TEMPDB01
Get-Mailbox -Database DB02 | Set-Mailbox -Database TEMPDB02
...
Get-Mailbox -Database DB30 | Set-Mailbox -Database TEMPDB30
- While the user is using the temporary database, you can restore the original database from the backup.
- After the original database is restored, you need to switch the mailboxes back to their original database. The commands are as follows:
Get-Mailbox -Database TEMPDB01 | Set-Mailbox -Database DB01
Get-Mailbox -Database TEMPDB02 | Set-Mailbox -Database DB02
...
Get-Mailbox -Database TEMPDB30 | Set-Mailbox -Database DB30
- After switching back to the mailbox, you can put the temporary databases into recovery mode and restore them if needed.
Here is a more detailed example of the entire process:
- Create a temporary database:
New-MailboxDatabase -Name TEMPDB01 -EdbFilePath "C:\TempDB01\TEMPDB01.edb" -LogFolderPath "C:\TempDB01\Logs"
New-MailboxDatabase -Name TEMPDB02 -EdbFilePath "C:\TempDB02\TEMPDB02.edb" -LogFolderPath "C:\TempDB02\Logs"
...
New-MailboxDatabase -Name TEMPDB30 -EdbFilePath "C:\TempDB30\TEMPDB30.edb" -LogFolderPath "C:\TempDB30\Logs"
- Redirect a mailbox:
Get-Mailbox -Database DB01 | Set Mailbox - Database TEMPDB01
Get Mailbox -Database DB02 | Set Mailbox - Database TEMPDB02
...
Get Mailbox -Database DB30 | Set-Mailbox - Database TEMPDB30
- Follow the backup restore procedure for each database.
- Switch mailboxes:
Get-Mailbox - Database TEMPDB01 | Set-Mailbox - Database TEMPDB01
Get-Mailbox - Database TEMPDB02 | Set-Mailbox - Database DB02
...
Get-Mailbox - Database TEMPDB30 | Set-Mailbox -Database DB30
- Put the temporary database into recovery mode:
Set-MailboxDatabase -Identity TEMPDB01 -AllowFileRestore $true
Set-MailboxDatabase -Identity TEMPDB02 -AllowFileRestore $true
...
Set-MailboxDatabase -Identity TEMPDB30 -AllowFileRestore $true
Notes:
- You will need an equal number of temporary databases to match the original databases to ensure proper recovery of the configuration.
- Follow these steps in order to avoid any configuration issues.
Please feel free to contact me for any updates. And if this helps, don't forget to mark it as an answer.
Best,
Jake Zhang