You are currently reviewing an older revision of this page.

DRAFT INT-XXXX Alter Cleanup.bat/sh to Prevent Archived KDB File Deletion

This article serves as a template that you can copy/paste into a new article for use later on.

The title of the article must be under 256 characters (less depending on the types of characters used in the title as this is a limitation of Telligent). It must describe as concisely as possible the issue faced. If there is a short enough error message, it should be included in the title for readability. Those using the Knowledge Base should get a good idea of what the article is about just by reading the title.

This description is for informational purposes only. There should be no text above the "Symptoms" header when using this template. The only exception to this is if the article you are writing is an issue that has been resolved, include the following green box above the Symptoms section:

This issue has been resolved in an Appian hotfix/new Appian version. Please apply the latest hotfix to your Appian installation or upgrade to the latest version of Appian.

Symptoms

Cleanup script ran with the following command:

cleanup.sh/bat logs -delete -keep <as many you would like kept>

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

[exec] Deleting: /usr/appl/aap/appian/services/data/archived/forums/af1.kdb
[exec] Deleting: /usr/appl/aap/appian/services/data/archived/forums/af2.kdb
[exec] Deleting: /usr/appl/aap/appian/services/data/archived/forums/af3.kdb
[exec] Deleting: /usr/appl/aap/appian/services/data/archived/forums/af4.kdb
[exec] Deleting: /usr/appl/aap/appian/services/data/archived/forums/af5.kdb
[exec] Deleting: /usr/appl/aap/appian/services/data/archived/forums/af6.kdb

Cause

The cleanup.sh/bat script utilizes log.xml found in <APPIAN_HOME>\server\_scripts\ant\

There is remnant code within log.xml when -logs option is used for a different script (cleanupArchives.sh/bat). This script no longer uses the -logs option as cleanup.sh/bat handles logs.

Action

  • Upgrade to the latest hotfix for your Appian Version.

Delete the following line of code from the log.xml file:

<!-- 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 section includes any relevant version information for Appian or other third/party configurations. Some examples of valid affected versions are as follows:

  • This article applies to all versions of Appian.
  • This article applies to Appian 7.11 and later.
  • This article applies to Appian 16.2 and earlier.
  • This article applies to Appian 7.11 and 16.1.
  • This article applies to Appian 16.1, 16.2, and 16.3.
  • This article applies to all versions of Appian from Appian 7.10 to Appian 16.2.
  • This article applies to all versions of Appian using JBoss EAP 6.4.9 as an application server and Internet Explorer 9 as a web browser.
  • This article applies to all versions of Appian Cloud.

Last Reviewed: Month YYYY