CircularLogArchiver – Automates the archiving of logs with the help of 7Zip
Written in 2009 for the Windows versions of the time. Check that the tool or steps still suit your environment before using them.
- 7-Zip installed
CircularLogArchiver by Shaun Vermaak automates the archiving of logs with the help of 7Zip.
It's particularly useful on large log directories were space is an issue.
Publishers website: https://www.ittelligence.com
ITtelligence mirror: CircularLogArchiver.zip (10.02 KB)
Usage: CircularLogArchiver.exe GO /LP:LogPath /LE:LogExtention /AI:Interval /AOT:ArchiveOlderThan /DAOT:DontArchiveOlderThan /DOT:DeleteOlderThan Example above will archive all files in "C:\Logs" with *.log extention that are between one and three months old and delete files older than three months
Example: CircularLogArchiver.exe GO /LP:"C:\Logs" /LE:"*.log" /AI:"M" /AOT:"1" /DAOT:"3" /DOT:"3"
How to Use ItLink to this section
The current download is version 2.00. It no longer calls 7-Zip; it writes standard .zip archives itself and needs .NET Framework 4.5.1.
CircularLogArchiver.exe GO [/LP:LogPath] [/LE:LogExtention] [/AI:ArchiveInterval] [/AOT:ArchiveOlderThan] [/DAOT:DontArchiveOlderThan] [/DOT:DeleteOlderThan]
CircularLogArchiver.exe GO /LP:"C:\Logs" /LE:"*.log" /AI:"M" /AOT:"1" /DAOT:"3" /DOT:"3"
CircularLogArchiver.exe GO /LP:"D:\IISLogs" /LE:"*.log" /AI:"D" /AOT:"7" /DAOT:"30" /DOT:"30"Parameter | Meaning |
|---|---|
GO | Required. Without it the tool only prints the settings and the usage text. |
/LP: | Folder to process. Subfolders are processed too. Default is the current folder; |
/LE: | File pattern to archive. Only the part after the first character is used, so |
/AI: | Age unit. |
/AOT: | Archive files at least this old. Default 0. |
/DAOT: | Do not archive files this old or older. Default no limit. |
/DOT: | Delete files at least this old that were not archived. Default no limit. |
Age is based on each file's last write time. Matching files go into an archive in the /LP: folder named after the file's month or day, such as CLA (2009-01).zip or CLA (2009-01-15).zip. A file is deleted only after it has been added to the archive. The tool first prints its settings, then one line per file: Archiving, Deleting, Ignoring or Unable to archive.
Note: files from subfolders are archived into the zip in the top /LP: folder, not next to the original file. /DOT: never removes old CLA archives, because the check compares the full path against CLA, so prune old archives yourself.
CircularLogArchiver version history
- Released as v2.0
- Usage shows the /LP, /LE, /AI, /AOT, /DAOT and /DOT switches as optional
- Initial release: automates log archiving with 7-Zip
- Archives by age range and deletes files older than a set age
No comments yet
Comments are moderated and appear once approved.