How To Clean Up A Damaged User Mailbox In Exchange 2016
In Exchange Server 2016 a recovery database allows us to mount a copy of a regular mailbox database on an Exchange server for performing a restore of a mailbox or mailbox items. Recovery databases can only be accessed past administrators performing mailbox restores, they are not accessible by cease users via Outlook or whatsoever other client application or device, and you will not be able to create new mailboxes on the recovery database.
Using the recovery database will not take an bear upon on the the active copy of the mailbox database that is running, and a recovery database can be used to mount an Exchange Server 2016 mailbox database from whatsoever other server in the same organization.
To recover a mailbox or mailbox items for Exchange Server 2016 using a recovery database the following process is used:
- Create the recovery database on an Substitution 2016 server
- Restore a database fill-in into the recovery database
- Run one or more mailbox restore requests
- Remove the recovery database when it is no longer required
In this article I will demonstrate the consummate end to end procedure.
Creating a Recovery Database for Exchange Server 2016
To begin with nosotros create the recovery database object itself. Before you do this you should ensure that yous have some storage available on the server to host the database and transaction log files that you will be restoring into the recovery database. The storage tin can be a book that already hosts other databases, there is no item need to apply a defended book for this purpose unless yous need to continue it divide to ensure that the recovery database is excluded from your regular backups. Even so I recommend you at least place the recovery database and log files in their ain folders away from the active database files.
In the Exchange Management Shell utilize the New-MailboxDatabase cmdlet to create the recovery database. If y'all know the EDB file name of the database you'll be restoring apply it now, but if yous don't know it or you need to change it later that's okay.
[ PS ] C : \ > New - MailboxDatabase - Server EX2016SRV1 - Name RecoveryDB - Recovery - EdbFilePath E : \ RecoveryDB \ DB05 . edb - LogFolderPath F : \ RecoveryDB Name Server Recovery ReplicationType -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - RecoveryDB EX2016SRV1 True None |
For an explanation of the warning bulletin that appears for restarting the Microsoft Exchange Information Store service read this article
If you audit the folder paths that you chose for the recovery database you'll find they are empty. Do not mountain the recovery database yet. Get-go nosotros demand to restore the database and transaction log files from backup.
Restore an Exchange Server 2016 Database into a Recovery Database
The restoration procedure for Substitution 2016 databases will depend on the backup software that you're using. You should consult the documentation from your vendor and follow their guidance. Some fill-in solutions do not use recovery databases at all, and will utilize their own utility to open the restored database file and excerpt the contents that you want to recovery. Nevertheless many others will employ the recovery database approach, including Windows Server Fill-in which I am demonstrating here.
In Windows Server Backup click on Recover to start a new recovery. I am choosing to recover a backup stored on another location.
The backup drive is attached to this server, and so I choose Local drives for the location blazon.
Select the backup drive from the drop down listing.
Select the name of the server from the sets on the backup bulldoze.
Select the date from which you desire to restore the database and log files.
In a regular Exchange 2016 database recovery we would cull Applications hither, only when working with recovery databases nosotros select Files and Folders instead.
From the tree view of available files to restore select the database and log files for the database y'all're recovering. Note that if the database and logs are in separate folders then you'll need to run two separate restore jobs to go them both.
Restore the files to the locations yous specified when you created the recovery database earlier.
Confirm your selections and click Recover to begin the restore.
Repeat the restore for the log files as well if necessary, then motion on to making the recovered database mountable.
Making a Restored Exchange Server 2016 Database Mountable
If the EDB file you restored is dissimilar to the EDB file proper noun you specified when creating the recovery database you'll need to set up that first. To test whether your recovery database is pointing at the correct file use Test-Path:
[ PS ] C : \ > Test - Path ( Get - MailboxDatabase RecoveryDB ) . EdbFilePath True |
If y'all do not run into a result of "True" use Movement-DatabasePath with the -ConfigurationOnly switch to update the EdbFilePath attribute to the correct path.
[ PS ] C : \ > Move - DatabasePath RecoveryDB - EdbFilePath East : \ RecoveryDB \ DB05 . edb - ConfigurationOnly Confirm This operation will skip the safety check and make the alter to Agile Directory directly . Do you want to continue ? [ Y ] Aye [ A ] Yes to All [ N ] No [ L ] No to All [ ? ] Help ( default is "Y" ) : y Confirm Are you sure you want to perform this action ? Moving database path "RecoveryDB" . |
Next, change directories to the location of the EDB file and utilize ESEUtil to bank check the state of the database, which should be in a "Dirty Shutdown" state at the moment. I've removed some of the output beneath for the sake of clarity.
[ PS ] E : \ > cd . \ RecoveryDB [ PS ] E : \ RecoveryDB \ > eseutil / mh . \ DB05 . edb Extensible Storage Engine Utilities for Microsoft ( R ) Commutation Server Version 15.01 Copyright ( C ) Microsoft Corporation . All Rights Reserved . Initiating FILE DUMP mode . . . Database : . \ DB05 . edb Fields : State : Dirty Shutdown |
A soft recovery needs to be performed to become the database file to a state of "Clean Shutdown" so that information technology will mount. We'll use ESEUtil and we need to know iii things to provide as arguments:
- The database file is located in E:RecoveryDB (brand certain y'all verify this by looking in Windows Explorer)
- The transaction log files are located in F:RecoveryDB (again, make sure yous verify this)
- The log file prefix is E00 (simply look at the files to see what your prefix is)
That makes the syntax for my soft recovery as follows, running it from the location where the log files are stored:
1 two 3 4 5 half-dozen 7 8 9 10 eleven 12 13 14 15 xvi 17 18 19 20 21 22 23 24 | [ PS ] E : \ RecoveryDB \ > cd F : \ RecoveryDB [ PS ] F : \ RecoveryDB \ > eseutil / r E00 / l F : \ RecoveryDB / d E : \ RecoveryDB Extensible Storage Engine Utilities for Microsoft ( R ) Exchange Server Version xv.01 Copyright ( C ) Microsoft Corporation . All Rights Reserved . Initiating RECOVERY mode . . . Logfile base name : E00 Log files : F : \ RecoveryDB Organization files : Database Directory : E : \ RecoveryDB Performing soft recovery . . . Restore Condition ( % complete ) 0 10 20 30 xl l sixty 70 eighty ninety 100 | -- -- | -- -- | -- -- | -- -- | -- -- | -- -- | -- -- | -- -- | -- -- | -- -- | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Functioning completed successfully in 3.265 seconds . |
Those command-line parameters are:
- /r for "Recovery mode"
- E00 is the log file prefix
- /l (that's a lower-case L) for the log file path
- /d for the folder path containing the database file (do not include the name of the EDB file itself, only the folder path)
Running ESEUtil /mh again should return a "Clean Shutdown" state this fourth dimension.
[ PS ] F : \ RecoveryDB \ > cd E : \ RecoveryDB [ PS ] Eastward : \ RecoveryDB \ > [ PS ] E : \ RecoveryDB \ > eseutil / mh . \ DB05 . edb Extensible Storage Engine Utilities for Microsoft ( R ) Exchange Server Version 15.01 Copyright ( C ) Microsoft Corporation . All Rights Reserved . Initiating FILE DUMP mode . . . Database : . \ DB05 . edb Fields : Country : Clean Shutdown |
The database is now fix to mount for mailbox recovery.
[ PS ] Due east : \ RecoveryDB \ > Mountain - Database RecoveryDB |
Running Mailbox Restore Requests in Substitution Server 2016
After restoring and mounting the recovery database we tin perform ane or more mailbox restore requests to remember mailbox or mailbox item information. To see which mailboxes are stored within the recovery database use Become-MailboxStatistics.
[ PS ] C : \ > Get - MailboxStatistics - Database RecoveryDB | ft - motorcar DisplayName ItemCount StorageLimitStatus LastLogonTime -- -- -- -- -- - -- -- -- -- - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - SystemMailbox { 0c020be6 - 3ce2 - 4eb7 - a458 - bfadd3171e86 } 10 HealthMailbox - EX2016SRV1 - Mailbox - Database - 1808423380 5269 . . . 015 xi : 45 : 25 PM HealthMailbox - EX2016SRV1 - 001 4 . . . 015 eleven : 48 : 32 AM HealthMailbox - EX2016SRV1 - 006 iii In - Place Archive - HealthMailbox - EX2016SRV1 - 006 2 In - Identify Annal - HealthMailbox - EX2016SRV1 - 001 2 . . . 015 12 : 02 : 55 PM In - Place Archive - HealthMailbox - EX2016SRV1 - Mailbox - Database - 1808423380 2 Alannah Shaw 3710 . . . 2015 three : 57 : 34 PM Personal Archive - Alannah Shaw 3452 . . . 2015 3 : 55 : 54 PM HealthMailbox - EX2016SRV1 - DB05 987 . . . 2015 ane : thirteen : 51 PM In - Place Archive - HealthMailbox - EX2016SRV1 - DB05 2 |
The mailbox for Alannah Shaw is available in this database. Let's wait at some different restore scenarios.
Restoring a Mailbox into the Original Mailbox
To restore a mailbox from the recovery database into the original mailbox we can run New-MailboxRestoreRequest with the post-obit parameters:
[ PS ] C : \ > New - MailboxRestoreRequest - Name "Alannah Shaw Recovery" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" |
If you need to restore to a different folder add together the -TargetRootFolder parameter as well.
[ PS ] C : \ > New - MailboxRestoreRequest - Name "Alannah Shaw Recovery" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" - TargetRootFolder "Mailbox Restore" |
Restoring a Mailbox into an Archive Mailbox
If you demand to direct the restored data into the person'southward annal mailbox instead you simply add together the -TargetIsArchive switch to the command.
[ PS ] C : \ > New - MailboxRestoreRequest - Proper noun "Alannah Shaw" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" - TargetIsArchive Proper noun TargetMailbox Status -- -- -- -- -- -- -- -- - -- -- -- Alannah Shaw exchangeserverpro . net / Company / Head Office / U . . . Queued |
Restoring a Mailbox to a Dissimilar Mailbox
If you are restoring the mailbox into a unlike user's mailbox (and this includes if you have recreated the user'due south mailbox to restore into) you will need to add the -AllowLegacyDNMismatch switch to the control.
[ PS ] C : \ > New - MailboxRestoreRequest - Proper noun "Alannah Shaw to Alan Reid" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alan Reid" - TargetRootFolder "Alannah Shaw Restore" - AllowLegacyDNMismatch Name TargetMailbox Status -- -- -- -- -- -- -- -- - -- -- -- Alannah Shaw to Alan Reid exchangeserverpro . net / Company / Caput Role / U . . . Queued |
Interesting note, in this example I'm actually restoring from an Commutation 2016 recovery database to an Substitution 2013 mailbox. Unfortunately, restoring to an Exchange 2010 mailbox is non supported.
Restoring Specific Folders from a Mailbox
In many restore scenarios y'all only want to recovery specific folders from the original database. The -IncludeFolders parameter can exist used to achieve this. There are two means to nominate the binder names.
For a personal binder (one that the user themselves created) merely utilise the binder name, and optionally you can include all sub-folders.
[ PS ] C : \ > New - MailboxRestoreRequest - Name "Alannah Shaw Invoices Recovery" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" - IncludeFolders "Invoices" [ PS ] C : \ > New - MailboxRestoreRequest - Proper noun "Alannah Shaw Invoices and Subfolders Recovery" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" - IncludeFolders "Invoices/*" |
For well-known folders (such as Sent Items, Inbox, Junk Email) the syntax is slightly different.
[ PS ] C : \ > New - MailboxRestoreRequest - Name "Alannah Shaw Inbox Recovery" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" - IncludeFolders "#Inbox#" [ PS ] C : \ > New - MailboxRestoreRequest - Proper noun "Alannah Shaw Inbox and Subfolders Recovery" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" - IncludeFolders "#Inbox#/*" |
Excluding Folders from the Restore Request
You tin can also exclude folders from the restore, for case the Sent Items or Deleted Items. The syntax is the same equally above and uses the -ExcludeFolders parameter.
[ PS ] C : \ > New - MailboxRestoreRequest - Name "Alannah Shaw Recovery Excluding Sent Items" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" - ExcludeFolders "#SentItems#" , "#DeletedItems#" |
Treatment Conflicts
If you're restoring into a mailbox or folder that already contains items in that location may be some conflicts. The -ConflictResolutionOption parameter lets you choose one of iii options:
- KeepSourceItem (the source in this case is the recovery database'southward re-create of the item, and this is the default pick)
- KeepLatestItem (the detail with the almost recent modified appointment)
- KeepAll (allows duplicates to be created)
[ PS ] C : \ > New - MailboxRestoreRequest - Proper noun "Alannah Shaw" - SourceDatabase RecoveryDB - SourceStoreMailbox "Alannah Shaw" - TargetMailbox "Alannah Shaw" - ConflictResolutionOption KeepAll Proper noun TargetMailbox Condition -- -- -- -- -- -- -- -- - -- -- -- Alannah Shaw exchangeserverpro . net / Company / Head Function / U . . . Queued |
Combining Scenarios
The scenarios above are examples and do not need to be used exclusively. You tin can combine different features to conform your detail restore scenarios, such equally:
- Restoring from Person A's mailbox
- Restoring to Person B'south mailbox archive mailbox
- Restoring to a folder named "Person A Restore"
- Excluding Deleted Items and Junk Mail
- Allowing duplicates
All of those can be achieved together in a single mailbox restore request.
Monitoring Mailbox Restore Requests
You lot tin can monitor the progress and whatever errors for a mailbox restore request by running Get-MailboxRestoreRequest and Go-MailboxRestoreRequestStatistics.
[ PS ] C : \ > Get - MailboxRestoreRequest Name TargetMailbox Condition -- -- -- -- -- -- -- -- - -- -- -- Alannah Shaw exchangeserverpro . net / Visitor / Head Function / U . . . Completed Alannah Shaw to Alan Reid exchangeserverpro . internet / Company / Caput Function / U . . . Completed Alannah Shaw Recovery Excluding Sent Items exchangeserverpro . net / Company / Caput Office / U . . . Completed |
1 2 3 four 5 6 7 8 9 10 11 12 13 14 fifteen 16 17 18 19 twenty 21 22 23 24 25 26 27 28 29 xxx | [ PS ] C : \ > Get - MailboxRestoreRequest - Name "Alannah Shaw" Name TargetMailbox Status -- -- -- -- -- -- -- -- - -- -- -- Alannah Shaw exchangeserverpro . net / Company / Head Office / U . . . Completed [ PS ] C : \ > Become - MailboxRestoreRequest - Proper noun "Alannah Shaw" | Get - MailboxRestoreRequestStatistics Proper name StatusDetail TargetAlias PercentComplete -- -- -- -- -- -- -- -- -- -- -- -- -- - -- -- -- -- -- -- -- - Alannah Shaw Completed Alannah . Shaw 100 [ PS ] C : \ > Get - MailboxRestoreRequest - Proper name "Alannah Shaw" | Get - MailboxRestoreRequestStatistics | Select Condition* , Include* , Exclude* , * Transfer* , OverallDuration , CompletedRequestAgeLimit Status : Completed StatusDetail : Completed IncludeFolders : { } ExcludeFolders : { } ExcludeDumpster : False EstimatedTransferSize : 108.6 MB ( 113 , 860 , 874 bytes ) EstimatedTransferItemCount : 3721 BytesTransferred : 41.02 MB ( 43 , 016 , 213 bytes ) BytesTransferredPerMinute : 0 B ( 0 bytes ) ItemsTransferred : 1557 OverallDuration : 00 : 02 : 57.1693947 CompletedRequestAgeLimit : 3650.00 : 00 : 00 |
Removing Mailbox Restore Requests
When completed the mailbox restore asking will remain until it is manually removed or until the request age limit has expired. The default age limit is 3650 days (10 years) then you can expect requests to stay around for a long fourth dimension.
You tin can specify your own age limit for mailbox restore requests when you lot first create them by calculation the -CompletedRequestAgeLimit parameter and providing a value such as "7.00:00:00" which is 7 days.
Otherwise, to remove the completed restore requests use the Remove-MailboxRestoreRequest cmdlet.
[ PS ] C : \ > Get - MailboxRestoreRequest | Where Status - eq Completed | Remove - MailboxRestoreRequest |
Removing the Recovery Database
When you are finished with your data recovery you tin remove the recovery database from the Exchange 2016 server. Starting time, dismount the database.
[ PS ] C : \ > Dismount - Database RecoveryDB Confirm Are you sure you want to perform this activeness ? Dismounting database "RecoveryDB" . This may result in reduced availability for mailboxes in the database . [ Y ] Yep [ A ] Yes to All [ N ] No [ L ] No to All [ ? ] Help ( default is "Y" ) : y |
Then remove the database.
[ PS ] C : \ > Remove - MailboxDatabase RecoveryDB Confirm Are yous certain you desire to perform this action ? Removing mailbox database "RecoveryDB" . [ Y ] Yes [ A ] Yes to All [ N ] No [ L ] No to All [ ? ] Help ( default is "Y" ) : y WARNING : The specified database has been removed . You must remove the database file located in E : RecoveryDBDB05 . edb from your computer manually if it exists . Specified database : RecoveryDB |
Finally, delete the files from the file organization on your server to reclaim that disk infinite.
Summary
In this article I demonstrated the consummate end to stop process for restoring a mailbox or mailbox items in Exchange Server 2016 using a recovery database. Yous saw how to create the recovery database, restore a database from Windows Server Backup, and how to run mailbox restore requests to extract information from mailboxes in the recovery database. Finally you lot saw how to clean upwards at the end of the restore procedure.
How To Clean Up A Damaged User Mailbox In Exchange 2016,
Source: https://practical365.com/restoring-exchange-server-2016-mailboxes-and-items-using-a-recovery-database/
Posted by: hughtitheivelt.blogspot.com
0 Response to "How To Clean Up A Damaged User Mailbox In Exchange 2016"
Post a Comment