Summary: Recovery Database (RDB) is a special database that helps administrators mount and restore mailboxes or mail items from a backup copy of the mailbox database. However, users may encounter an error "The location that you specified for the transaction log files is invalid", while creating or recreating a Recovery Database from backup copy to restore mailbox or mail items. In this blog, we’ve discussed steps to fix the error and restore mailboxes or mail items using Recovery Database. We’ve also mentioned an Exchange recovery software that can help restore mailboxes when backup isn’t available or obsolete.
“The location that you specified for the transaction log files is invalid. Verify that the directory exists and that there are no files in it.”
This error message appears when the Exchange administrator tries to recreate a Recovery Database to restore deleted or missing mailboxes and mail items. A Recovery Database helps administrators restore mailboxes and mail items from a backup without disrupting the active mailbox database, which is currently mounted and running. However, to recover mailboxes or mail items using Recovery Database, administrators need to follow the procedure correctly to avoid conflicts that may result in errors.
In this guide, we will discuss steps to fix the “The location that you specified for the transaction log files is invalid” error and restore the required mailboxes and mail items using the Recovery Database.
Reason for “The location that you specified for the transaction log files is invalid” Error
“The location that you specified for the transaction log files is invalid” error message is specifically observed when a user performs the following operations:
Step 1: Restores database and log files from backup (WSB) to an empty folder.
Step 2: Creates a Recovery Database, which generates new log files in the log folder.
Step 3: Restores mailboxes and items and then dismounts/removes the Recovery Database.
Step 4: Recreates Recovery Database using same EDB and logs folder path to restore mailboxes.
However, the RDB recreation fails with the “The location that you specified for the transaction log files is invalid” error message.
Steps to Fix “The location that you specified for the transaction log files is invalid” Error
To fix this, you can delete the log file generated earlier in Step 2. Do not change or remove the original log files. Then create the Recovery Database. Although this can fix the error, it is not recommended.
Instead, you can follow these steps to create a Recovery Database without facing the error message and restore the missing mailboxes and mail items.
Step 1: Create a folder on the drive with sufficient storage space.
Step 2: Restore the Mailbox Database from the backup to this folder.
You can use the Windows Server Backup to restore the mailbox database and log files to the empty folder. For instance, we created the EDBRecovery folder in the D: volume and restored the mailbox database and log files via WSB.
Note: Recovery Database cannot restore mailboxes or mailbox items created after the last backup. Use an Exchange recovery software to recover deleted mailboxes from your mailbox database (EDB) and restore all mail items.
Step 3: Execute the following command in the Exchange Management Shell (EMS):
NewMailboxDatabase -Recovery -Name RDB01 -Server -EdbFilePath “D:\EDBRecovery\ -LogFolderPath “D:\EDBRecovery\”
RDB01 is the Recovery Database name we entered. You can change this name.
Note: Replace D:\EDBRecovery with the folder name.
Step 4: Check database state and execute the EseUtil Soft Recovery.
Eseutil /mh <DatabaseName>
ESEUTIL /r <log_prefix> /l <log file folderpath> /d <EDB Folder Path>
Eseutil /mh RDB01
ESEUTIL /r E00 /l “D:\EDBRecovery\” /d “D:\EDBRecovery\”
Step 5: Execute the following command in Restart Microsoft Exchange Information Store Service:
Step 6: Use Exchange Management Shell (EMS) to mount the Recovery Database (RDB01).
Step 7: Check if Recovery Database contains mailboxes you want to restore.
Get-MailboxStatistics -Database RDB01 | Format-Table DisplayName,MailboxGUID -AutoSize
Step 8: Use New-MailboxRestoreRequest to restore mailbox or mail Items.
New-MailboxRestoreRequest -SourceDatabase DB1 -SourceStoreMailbox 1f20653g-se45 -TargetMailbox John
Step 9: Check Mailbox Restore Request status.
Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreRequest
Finally, check the destination mailbox via Outlook or OWA to ensure the mailbox content is restored.
In this blog, we’ve discussed the causes behind the “The location that you specified for the transaction log files is invalid” error and steps to resolve it. We’ve also discussed an alternative way to restore mailbox or mailbox items using Recovery Database while preventing the error. However, Recovery Database requires you to restore the mailbox database and log files from backup. If the backup isn’t available or obsolete, you can’t restore mailboxes or mail items using RDB. In such cases, you can use the best Exchange recovery software – Stellar Repair for Exchange. The software recovers deleted mailboxes from Exchange database (EDB) files and exports them to Outlook importable PST format. You can also use the software to directly import the recovered mailboxes or mail items into Office 365 or live Exchange server.