1 Reply Latest reply: Sep 7, 2017 3:59 PM by Kevin Case RSS

    Automatically Purge Qlik Sense Server Archived Log Files?

    Tim Kendrick

      I've had a Qlik Sense Server up and running for a couple years now. However, every once in awhile I need to go clear out the archived log files located at the path C:/Qlik/Sense/Repository/Archived Logs/[server name]/Scripts

       

      The machine that runs my Qlik Sense Server only has 126GB storage and these logs are currently taking up 94GB of space which is a little obnoxious.

       

      I have two questions:

      1. What are these files even used for? (Is it bad that I just deleted most of them?)
      2. Is there a way I can schedule a task so that it clears these out every month? or Can I set a expiration date on these files so it only keeps the past 30 days?
        • Re: Automatically Purge Qlik Sense Server Archived Log Files?
          Kevin Case

          Tim,

           

          I just created a batch job that moved the files to an archive folder.  It also cleans out old logs from the archive that are older than 31 days.  You could adjust the purging from the archive folder to a shorter time if space is an issue.

           

          Here is the script I use.

           

          MOVE c:\ProgramData\Qlik\Sense\Log\Script\*.* "F:\Log Archive\"

          MOVE "C:\ProgramData\Qlik\Sense\Repository\Archived Logs\server_name\Script\*.*" "F:\Log Archive\"

          Forfiles /P "F:\Log Archive" /M *.log /D -31 /C "cmd /c del @file /q"

           

          1.  It moved the script logs to the Log Archive folder on F

          2.  move all archived logs to the Log Archive folder on F

          3.  Delete files from the Log Archive folder that are older than 31 days.

           

          I have a scheduled task that runs once a week.  That allows me to keep Qlik's archived logs intact for the week and also gives me roughly a months work of older logs.

           

          If your Operation and License monitors are running on a regular basis, you really don't need to keep the logs.

           

          Hope this helps.

           

          Kevin