Appian retains historical data in process archives, .kdb files, and log files. These files can accumulate rapidly and must be actively managed.
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.
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.
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 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
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.|
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]
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 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
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