Truncate Exchange Logs

Pseudocode to truncate Exchange Logs

There are scenarios when your backup software might be unable to truncate the Exchange logs due to a Windows Update, botched application update, or some other reason. I have come across this simple pseudocode to truncate exchange logs.

Fake VSS Backup

Basically what this does is fake a VSS backup on the volume that the Exchange database is on, which ends up causing Exchange to truncate the logs.

Breaks Incremental Backups

This will break any backup softwares incremental backup chain so the next real backup will have to be a full backup.

Use Passive Copies

In a DAG, do this on a passive copy if possible.

Procedure

You have to add both the drive/mount point for the database and the log.

  1. Open Command prompt as Admin
  2. Run diskshadow
  3. Type add volume x: (where “x” is the drive for the Exchange database)
  4. Type add volume y: (where “y” is the drive for the Exchange log)
  5. Type begin backup
  6. Type create. This will take a few minutes while VSS does its thing.
  7. Type end backup. This is where it will set the logs to truncate. You will have to wait for the next log to generate before it starts to happen.

Yes indeed, it is that simple to truncate Exchange logs.

Leave me a comment if you have any additional queries and I shall be glad to assist.

Leave a Reply

Your email address will not be published. Required fields are marked *

PHP Code Snippets Powered By : XYZScripts.com