Microsoft Exchange administrators know that server logs are a necessary evil, especially if you need to keep copies of emails for quite some time. The problem is logs can take up a lot of precious space on a drive. For instance, when the server's C drive reaches capacity and you're unsure what to do, the Exchange log files are one of the first places to look.
Two ways to manage Exchange 2010 (and later) log files is with Windows Server Backup or circular logging. These solutions are drastically different, but both methods recover space on the server's drive. Let's look at each one and explore why you would want to enable either for your server.
Windows Server Backup
With the Windows Server Backup method, you commit the transactions and flush the logs (the logs being the piece that takes up the space). This ensures the data can be recovered, the piece of the system consuming your drive space is cleared, and you will have a backup of your data.
The nice thing about this approach is that all you have to do is create and regularly schedule the backup and let it run. In the act of completion of a backup, the Windows Server Backup tool will flush the logs.Windows Server Backup is quite simple to set up, and there is no special step necessary to set up the flushing of the Exchange logs. By creating the scheduled backup using the Windows Server Backup Wizard (Figure A), you should be good to go. Figure A
There is already a backup running to flush the Exchange logs. (Click the image to enlarge.)
I highly recommend scheduling this backup to run at a time when Exchange isn't going to be in heavy usage. Depending on how much data the server has, this backup can take quite a while, so make sure you schedule the backup with plenty of time to complete before the start of the next business day.
In the standard transaction logging used in Exchange 2010, a database transaction is first written to a log file and then written to a database. When that log file reaches one MB in size, it is renamed. After the previous log file is renamed, a new log file is created. This cycle continues and over time results in a set of log files. These files remain on the drive and can accumulate until there is no space remaining on the drive; this can cause a lot of problems.
You can avoid this issue by using the circular logging feature, which allows Exchange to overwrite transaction log files once the data contained with the log file is committed to the database. This method saves a lot of space, but you can only recover data up to the last backup. If your business requires the retention of multiple weeks, months, or years of Exchange data, circular logging is not the best method for you.
If circular logging is the method you need, here's how to enable the feature:
- Log on to your Exchange server.
- Open the Exchange management console.
- Expand the Organizational Configuration.
- Click Mailbox.
- Select the database for which you want to enable circular logging.
- Click Properties.
- Click Enable Circular Logging (Figure B).
- Click OK.
- Open the Services tool, search for Exchange Information Store, and restart this service. Circular logging will now be in effect.
If you change your mind, you can always go back and disable circular logging.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.