History cleanup in existing database?

I have an existing database where history cleanup was not done in the past,
and tables like ACT_HI_DETAIL, ACT_HI_VARINST,… needs now about 10GB space.
HistoryTimeToLive was not set.

How can I start a cleanup these old data now?

I have seen that I can set this flag via REST for current process definition now.

a) is the flag enough to start such a cleanup or do I need to define also a job for doing this ?
b) is the cleanup automatically done only for completed process instances or for all,
or is this done regarding a defined cleanup strategy (endTimeBased). If so where can I define this strategy ?

Thanks a lot
Thomas

1 Like

Hey @tpelzer!
I just checked the docu and it says that the history cleanup is going to delete:

  • Historic process instances plus all related historic data (e.g., historic variable instances, historic task instances, historic instance permissions, all comments and attachments related to them, etc.)
  • Historic decision instances plus all related historic data (i.e., historic decision input and output instances)
  • Historic case instances plus all related historic data (e.g., historic variable instances, historic task instances, etc.)
  • Historic batches plus all related historic data (historic incidents and job logs)

… more information can be found here: History and Audit Event Log | docs.camunda.org - If you haven’t seen this page I think it can answer quite a lot questions. :slight_smile:

To have some kind of automatic clean-up I recommend defining a “History Time to Live” for the future. History and Audit Event Log | docs.camunda.org

To start the cleanup via REST check out this docu snippet right here: Clean up history (POST) | docs.camunda.org

Let me know if you have any further questions. :slight_smile:
Best,
another Thomas

1 Like