Appian retains historical data in process archives, .kdb files, and log files. These files can accumulate rapidly and must be actively managed.
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.
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.
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.
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.
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).
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.
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
cleanup [Action] [Options] [Arguments]
|Clean up old log files.
|Clean up old archived processes.
|Display this information.
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]
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]
Use the delete option to delete specified files, without first moving them to a backup location.
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