Reclaiming Disk Space Lost to IIS Logs on SBS 2003
[Today's post comes to us courtesy of Justin Crosby]
Today we are going to discuss an SBS "house cleaning" tip. If you have been running SBS 2003 for awhile you may be using a lot of disk space to store old IIS logs. This is especially true if your clients are heavy OWA, ActiveSync, RPC over HTTP, or SharePoint users. A recent customer of mine had files dating back to 2004 and was using almost 2 Gigabytes of hard drive space to store these old logs.
To reclaim this space all you need to do is to delete the old files. Please be sure to back them up before deleting, just in case you need the logs in the future. I usually try to keep a weeks worth of logs and delete everything older than that. The logs will be in folders underneath C:\Windows\System32\LogFiles\ by default. The two largest folders on a typical SBS server will be W3SVC1 for the default web site and W3SVC4 for SharePoint (CompanyWeb). If you have created additional web sites you will need to check those site's folders as well.
To check to see if logging is enabled, you will need to open up IIS Manager from Administrative Tools. From there right-click on a web site (Default Web Site for example) and choose Properties. Select the Web Site tab. You should see something similar to the following:
If Enable logging is checked, then logging is enabled. To control where the log is stored, by default the logs are stored in C:\Windows\System32\LogFiles\, click the Properties button. You will get the screen seen below:
Note: It is inadvisable to search your hard drive(s) for *.log and delete all that you find. Many programs actively use information stored in .log files, such as Exchange, and deleting the file may cause issues.