• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1690
  • Last Modified:

Overwriting IIS logs

Is there anyway I can set IIS logs on an IIS6 server to be overwritten after a certain time?  OUr server just fills up with these and we only need to keep them for a week.
0
wannabecraig
Asked:
wannabecraig
2 Solutions
 
RovastarCommented:
There is nothing in  IIS that can do this.

However you can use Steve's tool here:
http://www.iislogs.com/

to remove/move/compress them for you.

I would actually compress them first as you may need more than a week for troubleshooting some issues and delete after x days/weeks.

Logs files are plain text and will compress like 95% so you can conserve space and have enough logs if you need them.
0
 
James MurrellProduct SpecialistCommented:
0
 
BlackIce80Commented:
we use robocopy to move our old logfiles to a backupdirectory.

so if you already know/use robocopy you could write a batch file with someting like this as a scheduled task:

robocopy c:\inetpub\logs C:\inetpub\logs\temp *.log /mov /s /minage:30
rmdir c:\inetpub\logs\temp /S /Q


the firstline says: from to whatkindoffiles moveinsteadofcopy evenfromsubdirectorys everythingolderthen:
the second line just removes the temporary directory and all files without asking
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now