---
title: "Data Retention Policies - DB24 Configuration"
url: https://db24.ai/docs/data-retention
description: "Configure data retention policies in DB24. Manage storage, set cleanup schedules, and optimize database performance with automated data lifecycle…"
lang: en
---

# Data Retention

Last updated: March 4, 2026

## DB24 Data Retention

## Introduction

DB24 includes **default data retention policies** designed to balance operational insight with efficient storage usage. These defaults can be customized to meet the specific needs of each environment.

Data cleanup is performed in **daily iterations** to prevent excessive data growth. In environments with large volumes of historical data, it may take several days to reach the configured retention targets due to controlled batch-cleaning limits per iteration.

Retention settings are managed in two places:

- **Datastore retention** is configured via the **DB24 Portal** under **Organization settings**.
- **Runtime retention** is configured per instance under the **Configuration** section on the detailed instance page.
* * *

## Datastore Data Retention

Datastore retention is handled by the nightly **`DB24MACGoodNight`** job, which removes outdated data according to the configured retention policies.

Image: image (https://lohbroyhmjcmnwfosiug.supabase.co/storage/v1/object/public/docs-images/1766786942462-a775x1.png)

DB24 provides a set of **predefined retention rules** that can be tailored to organizational requirements.

### Configuration

To manage Datastore retention:

1. Open the **DB24 Portal**
2. Navigate to **Organization Settings**
3. Select **Data Retention**
4. Adjust retention policies as needed

These settings control how long historical data is retained in the Datastore before being automatically cleaned up.

* * *

## Runtime Data Retention

Runtime data retention is managed by the **`DB24GoodMorning`** job, which runs each morning to clean up local Runtime data.

Because the Datastore collects Runtime data every two hours, long-term retention on the Runtime itself is typically unnecessary. For this reason, DB24 applies a **more aggressive predefined retention policy** at the Runtime level.

This approach ensures:

- Optimized storage usage on Runtime systems
- No unnecessary duplication of historical data
- Continued availability of relevant operational data in the Datastore
* * *

## Summary

DB24’s structured approach to data retention enables efficient system management by:

- Automatically cleaning up outdated data
- Optimizing storage usage across Datastore and Runtime components
- Supporting compliance and organizational data retention requirements

By separating Datastore and Runtime retention strategies, DB24 maintains long-term insight where it matters while keeping operational systems lean and performant.

## Related Documentation

- DB24 Overview (https://db24.ai/docs/overview) - Platform introduction

Previous Change Tracking: https://db24.ai/docs/change-tracking
Next Audit: https://db24.ai/docs/audit

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "DB24",
  "url": "https://db24.ai",
  "logo": "https://db24.ai/logo.png",
  "description": "SQL Server on autopilot. DB24 monitors, backs up and documents SQL Server automatically for organisations that run it without a dedicated DBA.",
  "contactPoint": {
    "@type": "ContactPoint",
    "contactType": "sales",
    "email": "sales@db24.ai"
  },
  "sameAs": [
    "https://www.linkedin.com/company/db24"
  ]
}
```