---
title: Record retention and eviction
url: https://www.tines.com/docs/records/record-retention/
updated: 2026-04-29T22:40:55+00:00
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Records](https://www.tines.com/llm/docs/records.md)*

# Record retention and eviction

*[View on tines.com](https://www.tines.com/docs/records/record-retention/)*

Control how long records are kept (retention) and what happens when a record type reaches capacity (eviction). These settings help you manage record storage, stay within your tenant's limits, and keep record data current.

## When to use retention and eviction

Configure these settings when you want to:

- **Automatically clean up stale data** — for example, delete alert records older than 90 days.
- **Cap a high-volume record type** — prevent one record type from consuming your entire tenant allowance.
- **Keep a rolling window of data** — evict the oldest records as new ones arrive, useful for metrics or ephemeral state.

## Configure the record type

When editing a record type, you are presented with options to define retention and eviction settings. 

Retention and eviction are not enabled by default – When the [limit](https://www.tines.com/docs/records/limits) is reached an error is shown and new records are not created.

### Custom record limit

Each record type has a maximum set by your tenant limit. To cap a specific record type below that maximum, turn on **Custom record limit** and enter a value (minimum of one).

Test and live records count toward the same limit.

![](https://www.datocms-assets.com/55802/1777498838-records-record-limit.png)

### Retention period

Set a retention period to automatically delete records after the configured amount of time. Choose from retention durations between one day and 10 years.

> **INFO:** Records without a configured retention period are kept for the duration of your active Tines license.

![](https://www.datocms-assets.com/55802/1777498864-records-retention-period.png)

### Record age is based on

This setting controls how the age of a record is evaluated for both time-based retention or eviction when the record limit is reached. 

- **Created at** — the time the record was first created.
- **Updated at** — the most recent time any field on the record changed.

> **TIP:** This option is shown when **Retention period** is enabled *or* **When record limit is reached** is set to "Evict oldest records".

![](https://www.datocms-assets.com/55802/1777498895-records-record-age-is-based-on.png)

### When record limit is reached

This setting controls what happens when a record type hits its limit:

<table border="1" style="border-collapse: collapse;"><colgroup><col style="width: 53.5581%;"><col style="width: 23.2209%;"><col style="width: 23.2209%;"></colgroup><tbody><tr><th class="TableHeader_t1c5hy0"><span>Option</span></th><th><span>Available on</span></th><th class="TableHeader_t1c5hy0"><span>ourcome</span></th></tr><tr><td class="TableCell_t8mlxr3"><span><strong>Send warnings and continue creating records</strong></span></td><td><p><span>• Self-hosted tenants</span></p></td><td class="TableCell_t8mlxr3"><span>Tenant admins are emailed when the record type reaches 80% and 100% of its limit. New records creation is <strong>allowed</strong>.</span></td></tr><tr><td class="TableCell_t8mlxr3"><span><strong>Send warnings and stop creating records</strong></span></td><td><p><span>• Cloud tenants<br></span></p><p><span>• Self-hosted tenants</span></p></td><td class="TableCell_t8mlxr3"><span>Tenant admins are emailed when the record type reaches 80% its limit. New record creation is <strong>blocked</strong>.</span></td></tr><tr><td class="TableCell_t8mlxr3"><span><strong>Evict oldest records</strong></span></td><td><p><span>• Cloud tenants<br></span></p><p><span>• Self-hosted tenants</span></p></td><td class="TableCell_t8mlxr3"><span>Tines automatically deletes the oldest records as determined by the<span>&nbsp;</span><strong>Record age is based on</strong> setting.</span></td></tr></tbody></table>

![](https://www.datocms-assets.com/55802/1777498912-records-when-limit-is-reached.png)

## Additional considerations

1. Test and live records are collectively considered against the record type's limit 
2. Test and live records are both retained and evicted together
3. Deleted or evicted records cannot be recovered
4. When a parent record is deleted, child records remain but their link to the parent is removed.

## Best practices

- **Start with "Send warnings" before enabling eviction.** This gives you visibility into how quickly a record type fills up before you commit to automatic deletion.
- **Use "Updated at" for living data.** If records represent ongoing state (inventory, configurations), basing age on the last update keeps active records from being evicted.
- **Set custom limits or shorter retention on high-volume record types.** This prevents a single noisy record type from consuming your tenant's entire record allowance.
- **Pair retention periods with eviction thoughtfully.** If both are configured, whichever threshold is hit first triggers deletion.
