Qlik Community

Qlik Sense Enterprise Documents & Videos

Documents & videos about Qlik Sense.

Qlik Sense Log Archiver / Eraser

Employee
Employee

Qlik Sense Log Archiver / Eraser

This is a PowerShell script which will move (or delete) older logs from the Qlik Sense default logging directories. This is useful as a tool to cleanup old logs if there are no requirements to keep them.

The valid configurable parameters are:

$days - Age threshold. The default value of 60 will move / erase all logs older than 60 days old

$option1 - This will move the files (see the robocopy flags for more configurable options)

$option2 - This will move the files in all sub-directories (see the robocopy flags for more configurable options)

$source - This is the path where you want to copy from. The default value is the Archived Logs folder, which is typically the place where old logs go.

$dest - The place where the logs will be moved to

$removelogs - N(o) then the logs will be kept in the $dest path or Y(es) then the logs will be deleted from the $dest path

Changelog:

v2: added /LOG:$scriptDir\robolog.log /MT to robocopy. ~40% performance improvement

DISCLAIMER

This tool is provided free of charge and is not supported. Qlik Sense Log Archiver / Eraser is not an official Qlik Sense product and is provided without warranty. Use of this script is entirely at the user's own risk.

Tags (1)
Attachments
Comments
luc_lacroix
New Contributor III

Hi,

Your two first link in "see the robocopy flags " are wrong:

     They are http://https//technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx

     insted of https://technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx

The commented link in the script is good.

Regards,

Luc

luc_lacroix
New Contributor III

Hi,

You fix partially the link (the : is missing)

     Now they are http//https//technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx

     Instead of http://https//technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx

Regards,

Luc

Community Manager
Community Manager

Thanks for the correction, Luc. I have updated the links to work properly now.

Best regards,

Qlik Community Team

ely_malki
Contributor

I got it. Thanks a lot, ltu I owe you a beer.

Version history
Revision #:
1 of 1
Last update:
‎10-27-2016 08:51 AM
Updated by: