Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT

Qlik Sense Enterprirse on Windows Log Archiver / Eraser

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Levi_Turner
Employee
Employee

Qlik Sense Enterprirse on Windows Log Archiver / Eraser

Last Update:

Aug 2, 2022 8:26:35 AM

Updated By:

Sonja_Bauernfeind

Created date:

Oct 27, 2016 8:51:11 AM

Attachments

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)
  • $option3: is for fine tuning robocopy, set to only touch files.
  • $option4: set the logfile location
  • $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

v3: added a better handling of deleting files + and additional version without robocopy if you just need to clean the files called deletearchivedlogs_olderthan60days.ps1

 

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)
Labels (1)
Comments
Anonymous
Not applicable

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

Anonymous
Not applicable

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

Anonymous
Not applicable

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

Best regards,

Qlik Community Team

elyM
Partner - Creator
Partner - Creator

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

Version history
Last update:
‎2022-08-02 08:26 AM
Updated by: