> For the complete documentation index, see [llms.txt](https://adatrack.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adatrack.gitbook.io/docs/documentation/administration/retention.md).

# Data Retention

AdaTrack manages your historical data through an automated **Data Retention Policy**. This ensures your dashboard remains fast and your storage costs stay within your subscription limits.

### What is Data Retention?

Data Retention defines the maximum amount of time AdaTrack stores your historical telemetry, alerts, and activity logs. Once a piece of data becomes older than your tier's retention period, it is automatically and permanently purged from the system.

### Retention Periods by Tier

| Tier           | Retention Period | Description                                                              |
| -------------- | ---------------- | ------------------------------------------------------------------------ |
| **Free**       | **90 Days**      | Ideal for testing and short-term monitoring.                             |
| **Flexible**   | **180 Days**     | Balanced retention for growing operations.                               |
| **Pro**        | **365 Days**     | Full year of history for trend analysis and compliance.                  |
| **Enterprise** | **Custom**       | Negotiated retention (e.g., 2+ years) to meet specific regulatory needs. |

### Affected Data Types

The retention policy applies to the following historical data:

* **Telemetry Data:** Individual sensor readings (temperature, GPS, etc.) stored in the time-series database.
* **Alert Events:** The history of triggered geofence breaches and telemetry alerts.
* **Workflow Executions:** The logs of your automated flow runs.
* **Report History:** Generated PDF and Excel report files.

### The Retention Worker

AdaTrack runs an automated **Retention Worker** every day during off-peak hours (typically 02:00 UTC). This worker:

1. Calculates the "Cutoff Date" based on your subscription tier.
2. Identifies data older than the cutoff.
3. Performs batch deletions to free up system resources.

### Important Considerations

* **Permanent Deletion:** Once data is purged by the retention worker, it cannot be recovered. We recommend using the [Reporting Module](/docs/documentation/features/reporting.md) to generate and download monthly summaries of critical data before it expires.
* **Usage Records are Persistent:** While the *details* of an event (like a specific telemetry packet) are purged, your **Usage Totals** (the count used for billing) are stored in the persistent **Usage Ledger** and are not subject to data retention.
* **Self-Hosted Retention:** If you are [Self-Hosting AdaTrack](/docs/documentation/getting-started/self-hosted.md), your retention period is determined by your [license tier](/docs/documentation/administration/licensing.md): 30 days (Community), 2 years (Standard), or custom/unlimited (Enterprise). See the [Licensing guide](/docs/documentation/administration/licensing.md) for setup details.

### How to Extend your Retention

If you need to keep your data for a longer period:

* **Upgrade your Tier:** Moving from **Free** to **Pro** doubles your retention period.
* **Download Reports:** Regularly generate and archive PDF/Excel reports for long-term storage outside of AdaTrack.
* **S3 Export (Enterprise):** Enterprise users can configure automated daily exports of their raw telemetry to their own AWS S3 buckets.
