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

Old .kdb files are automatically moved to an archive location (services/data/archived) when they are no longer in use. By default, the two most recent .kdb files for each engine are kept. Any older versions are deleted to preserve disk space.

Log Files

In addition to moving and deleting historical database files, the cleanup.bat (.sh) script is used to move the Appian 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>/conf/custom.properties.
    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 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 per day for system maintenance.

Cleanup Script

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

  • 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.

Usage

cleanup [Action] [Options] [Arguments]

Actions

logs Clean up old log files.
data Clean up old data files (*.kdb) in the live `gw*` directories.
processes Clean up old archived processes.
help Display this information.

Options and Arguments

Back up the 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.

-delete

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 three most-recent log files of each type and move all others to C:\BKUP20\logs.

cleanup logs -target C:\BKUP20\logs\ -keep 3

Open in Github Built: Fri, Jun 03, 2022 (01:08:29 PM)

On This Page

FEEDBACK