Configure automated cleanup jobs to maintain database health by removing old data. Astro Private Cloud (APC) includes several cleanup jobs that run as CronJobs on configurable schedules to manage storage growth and query performance.
Permanently removes deployments that have been soft-deleted after the retention period.
deletedAtRun this command from a machine with access to the underlying Kubernetes cluster:
Removes old deployment revision records to reduce database size.
deployRevision records older than retention periodRun this command from a machine with access to the underlying Kubernetes cluster:
Run this command from a machine with access to the underlying Kubernetes cluster to clean revisions for a specific deployment:
Purges task usage metrics and audit logs.
TaskUsage records (daily aggregated metrics)TaskUsageAuditLog records (raw task data)Minimum retention is 90 days and can’t be reduced.
Run this command from a machine with access to the underlying Kubernetes cluster:
Removes cluster audit log entries.
ClusterAudit records tracking cluster configuration changesRun this command from a machine with access to the underlying Kubernetes cluster:
Run this command from a machine with access to the underlying Kubernetes cluster to clean audits for specific clusters:
Cleans Airflow metadata from individual Deployment databases.
This job is disabled by default due to potential impact on running Deployments.
Default tables:
callback_request - Task callback requestscelery_taskmeta, celery_tasksetmeta - Celery metadatadag - Dag definitionsdag_run - Dag execution historydataset_event - Dataset eventsimport_error - Import errorsjob - Job recordslog - Task execution logssession - Session datasla_miss - SLA violationstask_fail - Task failurestask_instance - Task execution recordstask_reschedule - Reschedule eventstrigger - Trigger recordsxcom - Cross-communication dataExport archived data to cloud storage:
Clean only specific tables:
Run this command from a machine with access to the underlying Kubernetes cluster:
Default schedules are staggered to avoid simultaneous execution:
All cleanup jobs share these options:
All cleanup CronJobs use:
Forbid (prevents overlapping runs)Check CronJob exists:
Check job is enabled in Helm values
Verify schedule syntax is valid cron expression
Check job logs:
Database connectivity: Ensure Houston can reach the database
Permissions: Verify service account has required database permissions
olderThan won’t be deletedcreatedAt/deletedAt values in database