> For the complete documentation index, see [llms.txt](https://cloudback.it/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cloudback.it/docs/managing-backups/backup-retention-policy.md).

# Backup Retention Policy

Configure how long Cloudback keeps your repository backups with customizable retention policies, helping you manage storage efficiently.

Cloudback allows you to set up a backup retention policy for your repositories. The retention policy defines how long the backups should be kept before they are automatically deleted. Retention policies apply to all supported platforms.

## How Retention Works

A retention policy has two enforcement dimensions that both apply to every backup definition:

* **Age limit**: backups older than the configured number of days are deleted.
* **Count limit**: when the number of successful backups exceeds the configured maximum, the oldest backups are removed first.

Both limits are checked independently. A backup is removed if it violates either limit.

### Deduplication protection

Backups that serve as a deduplication parent (referenced by one or more newer backups) are **never deleted**, even if they exceed the configured limits. This ensures that backups referencing a parent archive always remain valid.

### Enforcement timing

Retention is enforced **hourly** by a background maintenance job. Changing a retention policy does not delete backups immediately - the change takes effect at the next hourly enforcement pass.

## Available Retention Presets

Cloudback includes the following built-in retention policies, available to all accounts:

| Policy | Age Limit | Count Limit |
|--------|-----------|-------------|
| Last 30 days | 30 days | 200 backups |
| Last 90 days | 90 days | 270 backups |
| Last 180 days | 180 days | 540 backups |
| Last 360 days | 360 days | 1080 backups |

The default policy for new accounts and new repositories is **Last 30 days**.

## Setting Up a Backup Retention Policy

Follow these steps to set a retention policy for a repository:

1. Go to the [Cloudback Dashboard](https://app.cloudback.it/).
2. Open the repository details page for the repository you want to configure.
3. In the **Settings** section, locate the `Retention` combo box and choose the retention policy you want to apply to the repository:

![Backup retention policy](https://cloudback.it/docs/assets/backup-retention-policy.png)

4. Click the **Save** button to save the changes.

You can update the retention policy for multiple repositories at once using [Bulk Operations](/docs/managing-backups/bulk-operations.md).

## Custom Retention Policies

If the built-in presets don't cover your use case, you can request a **custom retention policy** with specific age and count limits.

Custom retention policies can't be created from the UI. To request one, [contact the Cloudback support team](/docs/troubleshooting-and-support/contact-us.md) at [support@cloudback.it](mailto:support@cloudback.it) with your desired age limit (in days) and count limit. Custom policies are usually set up within one business day.

Once created, your custom retention policy will appear in the **Retention** dropdown alongside the built-in presets - both in the repository settings and in [Account Settings](/docs/managing-backups/account-settings.md). The support team can also restrict a custom policy to specific platform accounts.

## Account-Level Default Retention

The **Account Settings** page lets you configure a default retention policy that is applied automatically to all new repositories added to your account. Changing the account-level default does not affect repositories that already have a retention policy assigned - use [Bulk Operations](/docs/managing-backups/bulk-operations.md) to update existing repositories.

## Learn More

* [Account Settings](/docs/managing-backups/account-settings.md)
* [Bulk Operations](/docs/managing-backups/bulk-operations.md)
* [Contact Us](/docs/troubleshooting-and-support/contact-us.md)
