Oct 27

What is: Circular Logging in Microsoft Exchange Server

What is: Circular Logging in Microsoft Exchange Server

I had some issues with an Exchange Server and had to perform a restore operation. While doing so I noticed that even though the user mailboxes were not huge, the size of the mailbox store was. As I read more about it, Exchange maintains the Mailbox Database file and additional files which are the log files of everything that goes on. Simply put, you could almost recreate the database from the log files if it got corrupted, etc. if you perform a backup with a tool that does support Exchange 2013, it will take care of removing the log files so the space used on the hard drive does not grow out of control. If you are using a less fancy tool then you are probably backing up twice the data you should be. So here is where the whole notion of circular logging finally comes in:

The Microsoft Exchange transactional logging as explained above logs every single transaction that is performed on the database. Circular logging is then a method or call it feature used to conserve hard disk space by overwriting individual log files keeping the transactional log to a minimum. By default this option is disabled and there is no limit as to how large the mailbox database can get. If you enable it, it sets a limit to the size of the log and once that limit has been reached the first log file is overwritten. Think of it as the name implies, you have a circle of logs which are empty and you go around until you get back to were you started and begin overwriting the oldest logs, hence the name circular logging.

Now, when you perform a backup it clears the logs. The rationale behind this is that if you were to perform a restore you will need to rely only on the logs that were created after the backup to perform a hard restore of the database.

So thus far seems really cool how the logging works right? So why would someone turn on circular logging? It turns out Circular logging has been around for a while and back in the day hard disk space was hard to come by so you might want to conserve disk space and take a chance. Another possibility is that your backup engine does not have an Exchange plugin so those logs keep growing and growing. By enabling circular logging you take a risk as you don’t know when you backed up and how that maps to the logging files, but if you are comfortable with your backup infrastructure and savvy you could deal with it.

Leave a Reply

%d bloggers like this: