Deleting data based on a created policy or filter

Let’s say there is some program or something else that has generated a huge number of events or files, but this data is of no use to you and you need to delete it. There are two ways to delete data:

Event deletion policy

Using this policy, it is possible to delete events that fall under the filter criteria in a specified time range (if specified). Deletion does not occur immediately, but over a period of time (depending on the number of events).

Note

We recommend specifying the period for which you want to delete data. Otherwise, the policy will delete all events including new ones. Events and associated files are deleted.

Example of work

  1. Create an event deletion policy and enable it by clicking on “Policy is active”.

Illustration 1 — Deleting data based on a created policy or filter
  1. Go to the filter tab and select the data we need. In the example, we delete all events for the acrord32.exe application for April and May.

Illustration 2 — Deleting data based on a created policy or filter

Removing data using a filter

To delete data for a certain period, use the command:

ibatyr delete-filter [--from=YYYY-MM-DD] [--to=YYYY-MM-DD] FILTER_NAME

The command deletes events that fall under the criteria of the filter “FILTER_NAME” in the specified time range (if specified).

Note

The command will not work if the number of events to be deleted is more than 50000. In this case, it is recommended to use the event deletion policy.

Example of work

  1. Create a filter with data to be deleted

Illustration 3 — Deleting data based on a created policy or filter
  1. We delete all data from December 9 to February 13.

Illustration 4 — Deleting data based on a created policy or filter

123 events were removed from the database.