Xbus stores every envelope in its database, along with all the logs and process state.
It means the database grows fast, and can get very big (10th of Gb) in a few weeks if not less.
Therefore purging the data regularly is very important.
The purge is done in 3 steps:
This purge will remove all the process data (its state and its ProcessLogEntries). The command allow to chose which process will be purged, by their status and by their last status change date.
The command is:
xbusctl ps purge
For example, to keep the successful processes 1 week, and the failed ones 4 weeks, run these 2 commands every night:
xbusctl ps purge --status-done --status-unchanged-since 168h xbusctl ps purge --status-error --status-unchanged-since 672h
Note that the command is interactive and will ask for confirmation. It can be disabled by adding the –yes flag to the command.
This purge removes all the envelopes that are not referenced by a process anymore.
xbusctl envelope purge
This purge removes all the logs older that a given duration.
For example, to remove logs older than 60 days:
xbusctl logs purge --older 1440h