Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

Managed AAP on Azure — Data Retention Policy & Best Practices

Updated on

Request a new translation or translation update

A translation for your language preference does not exist. Click below to request a translation for your selected language.

Submit request

Background

This document provides data retention guidelines for customers running Red Hat Ansible Automation Platform (AAP) as a managed application on Microsoft Azure. Following these recommendations ensures database health, prevents backup failures, and maintains optimal platform performance.

Important: For long-term data retention exceeding 30 days for compliance or auditing, external log forwarding is the recommended approach as it keeps the AAP database lean while preserving a complete audit trail externally.

Overview

AAP customers must plan for short-term and long-term data storage. AAP's managed PostgreSQL database is optimized for short-term operational data (e.g., job history, activity streams), typically up to 30 days. For long-term compliance or auditing needs, customers should immediately configure external log aggregation post-deployment. This keeps the internal database lean while preserving a complete audit trail externally. Without regular cleanup, data accumulation leads to:

  • Backup timeouts and failures
  • Degraded UI performance
  • Increased storage costs
  • Longer restore times

Data Categories & Retention

1. Job History (Cleanup Job Details)

What it includes Job stdout, job events, job metadata (start/finish times, status, launched_by), ad hoc command history, project update history, inventory sync history, workflow job records
Recommended retention 30 days
Cleanup schedule Weekly (Sundays)

Why it matters: Job history is the single largest data contributor to the AAP database. A customer running 500+ jobs/day at 365-day retention can generate 50+ GB of job event data per year. This is the #1 cause of backup failures. Once the database size prevents successful backups, the system will be in an unsupported state.

2. Activity Stream (Cleanup Activity Stream)

What it includes Audit trail of all user and system actions — logins, permission changes, resource creation/deletion, configuration changes
Recommended retention 30 days (align with your organization's audit requirements)
Cleanup schedule Weekly (Tuesdays)

Why it matters: Activity stream data grows proportionally to user activity. High-user environments (50+ active users) should use shorter retention periods. When the resulting database size prevents successful backups, the system will be in an unsupported state.

How to Configure Retention

For long-term compliance and auditing, the recommended approach is to configure External Log Aggregation post-deployment (refer to the Data Export & Compliance section for details).

To configure the short-term operational data retention (Job History and Activity Stream) via the AAP UI, follow these steps:

  1. Navigate to Administration > Management Jobs
  2. For each cleanup job, click the Schedule tab
  3. Edit the schedule to set:
    • Days of data to keep: Enter the number of retention days (e.g., 30)
    • Frequency: Set the recurrence (Weekly is the recommended minimum; Daily for large environments)
  4. Save the schedule — the cleanup job will run automatically at the next scheduled time
  5. (Optional) To run cleanup immediately, click the Launch button on the Management Jobs page

Preventing Backup Failures

Root Cause

Managed AAP on Azure uses automated PostgreSQL backups. When the database exceeds the backup storage allocation or the backup takes longer than the maintenance window, the backup fails. Once the database size prevents successful backups—typically due to excessive retention of Job History or Activity Stream data—the Red Hat Ansible Automation Platform environment will be considered in an unsupported state.

Warning Signs

  • Slow UI response when loading job history or activity stream
  • Backup job notifications showing warnings or failures
  • Database size alerts from Azure monitoring
  • Job event queries timing out in the API

Immediate Remediation

If backups are already failing, follow these steps:

  1. Reduce Job History retention to 30 days temporarily
  2. Manually launch the "Cleanup Job Details" system job from Administration > Management Jobs
  3. Wait for cleanup to complete (may take 30–60 minutes for large datasets)
  4. Verify the next scheduled backup succeeds

Data Export & Compliance

If your organization requires long-term data retention for compliance or auditing purposes, consider these alternatives to extending in-platform retention:

Approach Description
External log aggregation Configure AAP to forward job logs to an external SIEM (Splunk, ELK, Azure Monitor) before cleanup removes them
Automation Analytics Enable Red Hat Insights / Automation Analytics to retain aggregated metrics beyond the cleanup window
API-based export Use the /api/controller/v2/jobs/ and /api/controller/v2/activity_stream/ endpoints to programmatically export data before cleanup

This solution is part of Red Hat's fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Red Hat LinkedIn YouTube Facebook X, formerly Twitter

Quick Links

Help

Site Info

Related Sites

© 2026 Red Hat