How To Fix: The Location That You Specified For The Transaction Log Files Is Invalid
by Barsha Bhattacharya Our Blogs Published on: 07 March 2025 Last Updated on: 11 March 2025

“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 the Recovery Database, administrators need to follow the procedure correctly to avoid conflicts that may result in errors.
In this guide, you will learn 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.
The location that you specified for the transaction log files is invalid: Reasons Behind This Error!
The error message is specifically observed when a user performs the following operations:
Step 1: It restores the database and the log files from the backup (WSB) to an empty folder.
Step 2: It 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 the same EDB and logs folder path to restore mailboxes.
However, the RDB recreation fails with the error message.
How To Fix: The location that you specified for the transaction log files is invalid.
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 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 as per your recovery database name.
Note: Replace D:\EDBRecovery with the folder name.
Step 4: Check the database state and execute the EseUtil Soft Recovery.
Eseutil /mh <DatabaseName>
ESEUTIL /r <log_prefix> /l <log file folderpath> /d <EDB Folder Path>
For instance,
Eseutil /mh RDB01
ESEUTIL /r E00 /l “D:\EDBRecovery\” /d “D:\EDBRecovery\”
Step 5: Execute the following command to restart the Microsoft Exchange Information Store Service.
Restart-Service MSExchangeIS
Step 6: Use Exchange Management Shell (EMS) to mount the Recovery Database (RDB01).
Mount-Database RDB01
Step 7: Check if the 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.
Potential Issues To Address:
In this context, these are the potential issues that you need to address:
- Incorrect File Names:
You have to check for typos or any invalid characters in the specified file names for the overall transaction logs.
- Issues With Network Drive:
If the location of logs is on the network drive then you have to ensure that the connection is accessible and stable.
- Corrupted Files:
If you suspect any chances of corruption then you can consider backing up the entire database. Don’t forget to do consistency checks for your database to repair any potential damage.
Frequently Asked Questions:
Check out the most frequently asked questions related to solving this error:
- How Do I Resolve A Transaction Log Full Issue?
You can back up your transaction logs to enable the records that need to be released and subsequently, the logs are truncated. So, if your logs have not been backed up ever, you have to develop two backups for allowing the entire Database Engine to shorten the log.
- How To Prevent Transaction Logs From Filling Up?
To make changes to the growing increment, you can use the option for FILEGROWTH. In such a case, 0’s value indicates that no additional space is allowed and the automatic growth option is off.
Moreover, you have to use the option called ‘Maxsize’ to exercise control over a log file’s maximum size in TB, GB, MB, and KB units. Also, you can just set the growth option to UNLIMITED.
- How Do I Enable Log File In MySQL?
To enable or disable a log for general query or change the name of the log file at the runtime, you can use general_log_file or global general_log file system variables. Moreover, you can also set the general_log to OFF or 0 for disabling the log. But for enabling it, move it to ON or 1.
Conclusion
In this blog, we’ve discussed the causes behind the “The location that you specified for the transaction log files is invalid” error and the steps to resolve it. We’ve also discussed an alternative way to restore mailbox or mailbox items using the Recovery Database while preventing the error.
However, the 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 the live Exchange server.