Data Maintenance

Appian retains historical data in process archives, .kdb files, and log files. These files can accumulate rapidly and must be actively managed.

Appian Engine Files

The execution and performance data contained in the Appian engines (.kdb files) must be moved to a backup location and deleted to prevent historical versions from consuming too much disk space.

Log Files

In addition to moving and deleting historical database files, the cleanup.bat (.sh) script is used to move the Appian and application server log files to a backup location and delete older versions. It must be run on each machine where log files are stored.

Process Archives

The system default archives a process 7 days after it has been canceled or completed. Historical archive files must be moved or deleted to prevent them from consuming too much disk space on your production system. This is done using the cleanup.bat (.sh) script.

Process archives are generated in the following ways.

  • The default archive interval is: 7 (days after process completion). After this time period, completed processes are automatically archived.
    1. You can override the default AUTOARCHIVE_DELAY setting by configuring <APPIAN_HOME>/ear/suite.ear/conf/
    2. Type the following configuration. server.conf.exec.AUTOARCHIVE_DELAY=n. Replace n with the number of days you want to include for the interval. You must create this file, if it does not already exist. For additional details, see Configuring Custom Properties for additional details.
  • Each Process Model can be set to its own archive interval from the Data Management Tab of the Process Model Properties dialog box in the Process Modeler. All processes spawned from the Process Model are impacted by this overriding archive interval (including previously completed processes).
  • Processes can also be archived using the archiveprocess.bat (.sh) script located in the <APPIAN_HOME>/server/_scripts/tools/ directory.

Automatically Deleting Completed Processes

Completed processes can be automatically deleted after a certain interval. See the Archiving Processes help topic for details regarding how to configure a process model's properties to enable automatic deletion of each completed or canceled process. There is no global setting for automatic process deletion.

All processes spawned by a Process Model are impacted by a change to its automatic-deletion setting (including processes that have already completed).

It is possible to modify the default interval displayed in the [ ] days field of the Delete processes option (on the Data Management Tab on each Process Model).

Cleanup Script

The cleanup.bat (.sh) script is used for the following data maintenance operations.

  • Copy data repositories from the Engine Servers to a backup location and delete old ones from the production server. As Appian checkpoints on a periodic basis it accumulates new versions of the engine data repositories. These files (*.kdb) must be backed up and purged from the production server to save disk space.

  • Copy log files to a backup location and delete old ones from the production server.

  • Copy process archives to a backup location and delete old ones from the production server.

The cleanup.bat (.sh) script is located in the <APPIAN_HOME>/server/_scripts/ directory.

  • On Windows, you may need to run the script as Administrator.

Cleanup Schedule

The 'cleanup.bat (.sh) script is intended to be run on a regular basis to preserve disk space. Use a Windows Scheduled Task, a cron job, or a Job Scheduler calendar to run this script at least once-a-week for system maintenance.

Only one type of file-cleanup can be performed each time the script is run. Any job(s) that you schedule must target each type of file (database files, log files, or process archives) separately.


cleanup [Action] [Options] [Arguments]


logs Clean up old log files.
data Clean up old data files (*.kdb).
processes Clean up old archived processes.
help Display this information.

Options and Arguments

Back up the engine files, log files, or archived processes.
Use the target option and specify the full or relative path to the location where a back up of the cleaned-up files are (or will be) stored.
-target [backup location]

Retain a given number of files on the production server.
Use the keep option to specify the number of existing files that are retained. For data files and log files, provide an integer specifying the number of files. For process archives, type the age (in days) of the oldest archive files that are to be retained.
-keep [the number of the most recent files to keep, or the retention interval for archived processes listed in days]

Delete files.
Use the delete option to delete specified files, without first moving them to a backup location.

Cleanup Script Examples

To move archived processes that are older than 100 days to a specified backup directory.
cleanup processes -target C:\BKUP20\ap\ -keep 100

To keep the 10 most-recent data files and delete any that are older.
cleanup data -delete -keep 10

To keep the three most-recent log files of each type and move all others to C:\BKUP20\logs.
cleanup logs -target C:\BKUP20\logs\ -keep 3

Configuration Files

The cleanup script relies on certain scripts that use configuration files to define their behavior. The file locations are listed here for your information only. We do not recommend modifying these files, which may lead to loss of data. Any changes to these files must be performed at your own risk.

Properties Used when Deleting Files

Properties Used when Moving Files

Properties Used when Managing Process Archive Files

Properties Used when Managing Log Files