Skip to main content

Data Retention

Written by DataFromSky

Overview

Data Retention allows administrators to configure how long different types of data are kept on the device. Retention periods are specified in hours and can be adjusted to balance storage usage and comply with project-specific data retention requirements.

Figure: Block->Settings->Data Retention.

The feature is available in Block → Settings → Data Retention. Automatic retention can be enabled globally and then configured individually for each supported data category. Retention is based on the data creation time, not the time they describe. Data older than the configured limit is permanently deleted and cannot be recovered.

Data Categories

When retention is disabled for a category, its data is kept until the overall storage capacity or database limits of the device require older records to be removed.

Figure: Categories in the Data Retention feature.

Supported data categories:

  • Video recordings – recordings stored by the video recorder.

  • Image evidence – evidence snapshots captured by analytics and stored in the device database.

  • Traffic statistics – historical widget and sink outputs such as counts, statistics, or OD matrices.

  • Traffic events – stored traffic events including incidents, lane events, near-miss events, and similar analytics outputs.

  • Trajectory data – object trajectories used for playback overlays and analysis.

  • Audit log – records of user actions performed on the device. Retention can only shorten the default audit log policy and cannot extend it.

  • Diagnostics – operational and diagnostic system records.

Implementation Details

  • Cleanup runs automatically in the background and processes data in small batches to minimize the impact on normal device operation.

  • Database records (events, trajectories, statistics, image evidence, diagnostics) are checked every 10 minutes by default (configurable, minimum 1 minute). Video recordings are managed separately by the video recorder and checked every 60 seconds.

  • Retention is calculated from the data creation time. For example, an event configured for 48 hours is deleted exactly 48 hours after it was created.

  • The currently recorded video is never deleted prematurely.

Maximum Output Capacities

Besides the time-related Data Retention mechanism, each output type has its own maximum number of records that can be stored in the device database. The limit depends on the device type and is applied independently to every output. Once the limit is reached, the oldest records are automatically removed, keeping only the most recent records.

  • Capacities are applied independently to every output. Each widget or sink maintains its own database history. For example, three Distribution widgets each have their own capacity and do not share storage with one another.

  • Capacities depend on the device type. More powerful devices can store a larger history for the same output type. The table below lists the default capacities for each supported device category.

  • Capacities also vary by output type. More storage-intensive outputs are assigned lower capacities, while compact outputs can store significantly more historical records.

  • Cleanup starts after the configured capacity is slightly exceeded. Once the number of stored records grows by approximately 10% above the configured capacity, the oldest records are automatically removed until the configured capacity is reached again.

  • Some output types are not stored in the database. A value of 0 means the output is available only in real time and no history is stored. A value of 1 indicates snapshot outputs (such as Heatmap or Trajectory View), where only the latest state is kept.

  • The values shown below are the default configuration. They can be adjusted in the Block configuration ([History]) for individual output types.

  • Unknown device types use the same capacities as the TrafficCamera device group.

The table below lists the default capacities for each output type and device category.

Output type

Camera

Xroads & Embedded / Orin

Enterprise & Aerial

Demokit

Value

10,000

50,000

100,000

10,000

Statistical Value

10,000

50,000

100,000

10,000

Distribution

10,000

50,000

100,000

10,000

Events

10,000

50,000

100,000

10,000

Generic Events

10,000

50,000

100,000

10,000

MultitrafficLanesData

10,000

50,000

100,000

10,000

MovementSetStatistics

10,000

50,000

100,000

10,000

NTCIP

10,000

50,000

100,000

10,000

StateWatcher

10,000

50,000

100,000

10,000

ForegroundDetector

10,000

50,000

100,000

10,000

StringValue

10,000

50,000

100,000

10,000

CortexWatcher

10,000

10,000

10,000

10,000

OD Matrix

1,250

5,000

10,000

1,000

Traffic Lanes Events

1,250

5,000

10,000

1,000

Heatmap

1

1

1

1

Trajectory View

1

1

1

1

Table

0

0

0

0

RawTrajectories

0

0

0

0

RawTrajectoriesUDP

0

0

0

0

CategoryCount

0

0

0

0

ZoneStats

0

0

0

0

File

0

0

0

0

LiveView

0

0

0

0

TrajectoryEvents

0

0

0

0

SdlcChannelValue

0

0

0

0

NearMissEvents

0

0

0

0

OpcUaTrafficEvents

0

0

0

0

Figure: Default history capacities for individual output types and outputs.

Important

  • Data is automatically removed as soon as the first applicable limit is reached—either the configured Data Retention period, the maximum output capacity, or the overall device storage capacity. The oldest records are removed first.

  • Deleted data cannot be recovered.

Did this answer your question?