You are currently reviewing an older revision of this page.

DRAFT KB-XXXX Cleanup script removes archived kdb files

Symptoms

Cleanup script is run within <APPIAN_HOME>/server/_scripts/ using the following command:

cleanup.sh/bat logs -delete -keep <# of days of logs kept>

Running the above script does not only delete logs, but will also delete archived KDB files, which can be noticed as part of the output:

[exec] Deleting: <APPIAN_HOME>/services/data/archived/forums/af1.kdb
[exec] Deleting: <APPIAN_HOME>/services/data/archived/forums/af2.kdb
[exec] Deleting: <APPIAN_HOME>/services/data/archived/forums/af3.kdb
[exec] Deleting: <APPIAN_HOME>/services/data/archived/forums/af4.kdb
[exec] Deleting: <APPIAN_HOME>/services/data/archived/forums/af5.kdb
[exec] Deleting: <APPIAN_HOME>/services/data/archived/forums/af6.kdb

More information regarding the Cleanup script can be found in the following article:

https://docs.appian.com/suite/help/19.4/Data_Maintenance.html#log-files

Cause

This issue has been addressed via AN-146512 in the following hotfixes/versions:

  • 18.3.272.0
  • 18.4.232.0
  • 19.1.197.0
  • 19.2.180.0
  • 19.3.112.0

Action

Please apply the latest hotfix to your Appian installation or upgrade to the latest version of Appian.

Workaround

To prevent the cleanup.bat(.sh) script from deleting archived kdb files, remove the following lines from the log.xml file found in <APPIAN_HOME>\server\_scripts\ant\

<!-- Komodo Log Archive Cleanup -->
  <echo message="Cleaning Service Manager Transaction Log Archives"/>
  <property environment="env"/>
  <if>
    <os family="windows"/>
    <then>
      <exec executable="cmd" dir="${env.AE_HOME}/services/bin">
        <arg line="/c cleanupArchives.bat logs -k ${log.numkeep}"/>
      </exec>
    </then>
    <else>
      <exec executable="/bin/bash" dir="${env.AE_HOME}/services/bin">
        <arg line="cleanupArchives.sh logs -k ${log.numkeep}"/>
      </exec>
    </else>
  </if>

Affected Versions

This article applies to Appian 18.3 and later.

Last Reviewed: December 2019