> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cleanup Settings

> How to configure log file cleanup intervals and archiving options in CData Arc.

Arc automatically cleans up log files at regular intervals to maximize application performance. Use the **Cleanup Settings** section on the **Advanced** page to specify whether to **Archive** or **Delete** the log files, set the **Interval** at which to delete them, and specify the **Archive Type** and location for archived files. You can also manually start a cleanup task from this page.

![Cleanup settings page](https://mintcdn.com/cdata-arc/JuVWSaGlKX7avH_C/26.4/images/settings_cleanup.png?fit=max\&auto=format\&n=JuVWSaGlKX7avH_C\&q=85\&s=bc15301e6fb713335c5f3f4dfcdcb417)

| Setting | Description |
| - | - |
| **Type** | Specify whether to archive or delete logs during cleanup. |
| **Interval** | Specify (in days) the cleanup threshold. For example, when set to 5 days, only logs and database entries over 5 days old are cleaned up. [Automation logs](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/activity.md#automation-logs) use the shorter of seven days and this interval. |
| **Include files in Sent folders** | Archive or delete files in the connector's Logs/Sent folder that have been successfully sent in the flow. Sent files can consume large amounts of disk space. This option frees up disk space by cleaning up sent files when the cleanup runs. |
| **Include files in Send folders** | Archive or delete files that accumulate in the connector Send folders. |
| **Include files in Receive Folders** | Include files in Receive folders in cleanup operations. |
| **Archive Type** | Specify whether the archive should be sent to your local file disk or to an S3 bucket. Only applicable when **Type** is set to **Archive**. |
| **Local Archive Folder** | Applicable when the **Archive Type** is **Local Disk**. By default, the archive folder is a folder called `archive` in your application directory (`archive` is the only relative path supported). To use a different location, enter an absolute path. If you leave the field empty, each [connector folder](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/architecture.md#connector-folders) contains its own **Archive** folder. |
| **S3 Options** | If the **Archive Type** is **S3**, set the following S3-specific options: **S3 Bucket**, **S3 Access Key**, **S3 Secret Key**, and **S3 Region**. |
| **Run Cleanup** | Manually starts a cleanup task. A global cleanup also removes [automation logs](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/activity.md#automation-logs) that exceed the retention rules. A workspace-limited cleanup does not remove them. |

> [!NOTE]
>
> If Arc alerts you that the number of transactions in your application database has exceeded the threshold for that database, changing the cleanup settings on this page is one way to reduce the number of stored records and bring the count back below the threshold. Your other option is to migrate to a database with a higher threshold. For threshold values by database, see the application database configuration section for your implementation: [Cross-Platform edition](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/installation/cross-platform-edition.md#configure-the-application-database) or [.NET edition](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/installation/windows-edition.md#configuring-the-application-database).

## Include files in Send folders

When a large number of files accumulate in connector Send folders, the performance of the application can suffer. These files can accumulate for various reasons, including:

* A connector exceeds the maximum number of retries for a message and no error path is configured for that connector.
* The Send folder for a connector was overridden in a legacy version of Arc and pointed at a shared folder that the application could not clean up. The ability to change the Send folder and apply Send Filters is deprecated in current versions of Arc. You should use error paths instead.

> [!NOTE]
>
> If you enable this feature, ensure that your connectors process files in the Send folder on a shorter interval than the cleanup interval you specify on this page. Otherwise, the application might clean up the files in the Send folder before the connectors can process them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.