# Auto Cleanup Settings

Cloud Voice stores your operational data: call detail records (CDRs, the per-call records used for reporting and billing), call reports, voicemails, recordings, chat data, faxes, backups, and the various system logs, all in a default storage area. To keep that storage from filling up, the Auto Cleanup feature enforces a limit on each data type and removes the oldest entries automatically once a limit is reached. This page describes every auto cleanup setting and its default and maximum values.

## How auto cleanup works

Each data type has its own limit, defined either as a maximum count (or storage size) or as a number of days to retain records. When a limit is reached, Cloud Voice deletes the oldest records of that type to stay within it. A retention setting of `0` days means the records are never removed on a time basis.

For many data types, reaching 90% of a limit also raises an **Auto Cleanup Reminder** event, which notifies the contacts you have configured so you can act before anything is deleted. This reminder applies to CDR, call reports, voicemail, recordings, recording logs, external chat data, and system backup files. It does **not** apply to fax data or to the event, email, operation, and system log categories, those simply drop their oldest records when the limit is hit.

:::caution
Every setting on this page is a deletion control. When a limit is reached, Cloud Voice removes the oldest matching records permanently, and deleted records cannot be recovered. If you set a limit below the amount of data you already hold, the surplus is purged right away rather than at some future date. Before you tighten any count, storage size, or preservation-day value, confirm you no longer need the records it will remove (for example, CDRs kept for billing or call recordings kept for compliance or dispute resolution).
:::

## CDR Auto Cleanup

:::note
A platform update modernized the CDR module with a redesigned data structure that gives clearer displays and fuller call details. As a result your system may hold both legacy CDRs (created before the update) and new CDRs. When legacy CDRs are present and the total CDR count reaches the limit, Cloud Voice clears legacy records faster than new ones, five legacy CDRs are removed for every one new CDR generated (a 1:5 ratio).

- **Legacy CDRs:** the CDR and its associated call report data are deleted together.
- **New CDRs:** the CDR and its associated timeline data are deleted together, while the related call report data is removed according to the [Call Reports Auto Cleanup](#call-reports-auto-cleanup) settings.
:::

| Setting | Description |
| --- | --- |
| Max Number of CDR | The largest number of CDRs to keep. When the limit is reached, the oldest CDR is deleted. **Default:** 200,000. **Maximum:** 300,000 with the call timeline enabled, or 700,000 with it disabled. |
| CDR Preservation Days | The longest a CDR is kept. When a CDR reaches this age, it is deleted. **Default:** 0 (no limit). |

## Call Reports Auto Cleanup

:::note
Call report data created after the CDR module update is cleaned up using the settings below. Legacy report data is removed together with legacy CDRs, following the [CDR Auto Cleanup](#cdr-auto-cleanup) rules.
:::

| Setting | Description |
| --- | --- |
| Max Number of Call Reports | The largest number of call reports to keep. When the limit is reached, the oldest call report is deleted. **Default:** 200,000. **Maximum:** 1,000,000. |
| Call Report Preservation Days | The longest a call report is kept. When a report reaches this age, it is deleted. **Default:** 0 (no limit). |

## Voicemail Auto Cleanup

| Setting | Description |
| --- | --- |
| Max Number of Voicemail | The largest number of voicemails to keep. When the limit is reached, the oldest voicemails are deleted. **Default:** 100. **Maximum:** 500. |
| Voicemail Preservation Days | The longest a voicemail is kept. When a voicemail reaches this age, it is deleted. **Default:** 0 (no limit). |

## Recording Auto Cleanup

### Recording files

:::note
Automatic cleanup removes recording files from PBX local storage only (PBX means Private Branch Exchange, the phone system's own on-box storage). Files already copied to a third-party archive server are left in place, and the associated recording logs stay available and manageable.
:::

| Setting | Description |
| --- | --- |
| Recordings Preservation Days | The longest a recording file is kept. The oldest recording files are deleted when they reach this age or when your recording capacity (in recording minutes) is reached. **Default:** 0 (no limit). |

:::note
- If both the preservation-day limit and the recording-minute capacity are reached, Cloud Voice removes files by recording minutes first, then by preservation days.
- Recording capacity is purchased separately. To add capacity, contact your service provider.
:::

### Recording logs

:::note
When a recording log is cleaned up, Cloud Voice deletes the log and handles the associated recording file based on where it is stored:

- **Unarchived recordings:** both the log and the recording file on PBX local storage are deleted.
- **Archived recordings:** the log and any copy of the file on PBX local storage are deleted, while the copy on the third-party archive server is left untouched.
:::

| Setting | Description |
| --- | --- |
| Max Number of Recording Logs | The largest number of recording logs to keep. When the limit is reached, the oldest recording logs are deleted. **Default:** 1,000,000. **Maximum:** 3,000,000. |
| Recording Logs Preservation Days | The longest a recording log is kept. When a log reaches this age, it is deleted. **Default:** 0 (no limit). |

## External Chat Data Auto Cleanup

### Chat logs

| Setting | Description |
| --- | --- |
| Max Number of External Chat Logs | The largest number of external chat logs to keep. When the limit is reached, the oldest logs are deleted. **Default:** 50,000. **Maximum:** 100,000. |
| External Chat Data Preservation Days | The longest an external chat log is kept. When a log reaches this age, it is deleted. **Default:** 0 (no limit). |

### Chat files

| Setting | Description |
| --- | --- |
| Max Storage of Chat Files (GB) | The total storage allowed for external chat files, including documents and images. When the limit is reached, the oldest chat files are deleted. **Default:** 1. |
| External Chat Files Preservation Days | The longest an external chat file (document or image) is kept. When a file reaches this age, it is deleted. **Default:** 7. Enter `0` for no limit. |

## Fax Data Auto Cleanup

| Setting | Description |
| --- | --- |
| Max Storage of Fax File (MB) | The total storage allowed for fax files. When the limit is reached, the oldest fax files are deleted. **Default:** 1024. |
| Fax Log Preservation Days | The longest a fax log is kept. When a log reaches this age, it and its associated fax files are deleted. **Default:** 7. Setting this to `0` removes the day limit; even so, to protect performance the oldest fax logs and their files are deleted once the total reaches 200,000. |

## System Backup Files Auto Cleanup

| Setting | Description |
| --- | --- |
| Max Number of Files | The largest number of backup files to keep. When the limit is reached, the oldest backup files are deleted. **Default:** 5. **Maximum:** 8. |

## Event Logs Auto Cleanup

| Setting | Description |
| --- | --- |
| Max Number of Logs | The largest number of event logs to keep. When the limit is reached, the oldest event logs are deleted. Some event logs cannot be cleaned up automatically; once those reach 5,000, the oldest among them are deleted. **Default:** 50,000. **Maximum:** 1,000,000. |
| Logs Preservation Days | The longest an event log is kept. When a log reaches this age, it is deleted. **Default:** 0 (no limit). |

## Email Sent Logs Auto Cleanup

| Setting | Description |
| --- | --- |
| Max Number of Logs | The largest number of email sent logs to keep. When the limit is reached, the oldest email sent logs are deleted. **Default:** 50,000. **Maximum:** 1,000,000. |
| Logs Preservation Days | The longest an email sent log is kept. When a log reaches this age, it is deleted. **Default:** 0 (no limit). |

## Operation Logs Auto Cleanup

| Setting | Description |
| --- | --- |
| Max Number of Logs | The largest number of operation logs to keep. When the limit is reached, the oldest operation logs are deleted. **Default:** 50,000. **Maximum:** 1,000,000. |
| Logs Preservation Days | The longest an operation log is kept. When a log reaches this age, it is deleted. **Default:** 0 (no limit). |

## System Logs Auto Cleanup

| Setting | Description |
| --- | --- |
| Max Storage of Logs (MB) | The maximum size of a system log package. When the package reaches this size, its oldest logs are deleted. **Default:** 10. |
| Logs Preservation Days | The longest a system log is kept. **Default:** 7. **Maximum:** 15. |
