Start typing to search.

Operations

Run and log retention

View Markdown

Configure scheduled cleanup of terminal runs, choose between pruning logs and deleting run records, and align retention with backups and audit needs.

Envoy retention applies to terminal task runs and their captured logs. Set it deliberately: run metadata, logs, metrics, source data, exports, and backups have different lifecycles.

Configuration

In envoy-server.yaml:

runs:
  retention:
    max_age_days: 30
    delete_runs: false
    cleanup_cron: "0 3 * * *"
  • max_age_days selects terminal runs older than the threshold. Set it to 0 or less to disable scheduled cleanup.
  • delete_runs: false removes captured logs and keeps the run record.
  • delete_runs: true removes eligible run records and their associated logs and metrics.
  • cleanup_cron controls when the control-plane cleanup executes.

The cleanup considers terminal statuses: successful, failed, completed, and cancelled runs. It does not intentionally prune active work.

Keep metadata, prune logs

The conservative policy is:

delete_runs: false

The run remains available for audit and operational history, while its log pointer is cleared after the log store entry is removed. Metrics remain available until their own retention or a later run deletion.

Use this when the fact and outcome of execution must outlive detailed record-level diagnostics.

Delete run history

With delete_runs: true, cleanup:

  1. removes references from job-run task rows where required;
  2. deletes run log data;
  3. removes run metrics;
  4. deletes each run record.

Cleanup is best effort across supporting stores. Monitor server logs for failures, especially after changing database permissions or log backends.

Deleting child run records reduces the detail available on older job runs.

Manual cleanup

Admins and superadmins can clear logs or delete eligible runs from the UI. Bulk delete is available on run lists.

Clearing logs and deleting runs are distinct:

  • clear logs when metadata should remain;
  • delete only when retention policy permits removal of the record and metrics.

Stopping an active run does not delete it.

Log stores

Per-run logs can use file, database, MSSQL, PostgreSQL, or VictoriaLogs storage according to server configuration. Retention calls the configured log-store delete path; ensure that service identity has delete permission.

Container stdout is operational process output and is governed by the container platform's logging policy, not Envoy run retention.

Manage these separately:

  • SQLite or MSSQL metrics backend pruning;
  • public-dashboard exports downloaded by users;
  • Data Explorer exports;
  • connector source and destination records;
  • uploaded files;
  • state-database backups and Litestream replicas;
  • identity-provider and ingress audit logs;
  • AI conversation history.

Do not assume deleting an Envoy run removes data written to an external destination.

Policy checklist

  1. Determine the audit period for run metadata.
  2. Determine the shorter period, if appropriate, for record-bearing logs.
  3. Configure the log backend and its access controls.
  4. Set delete_runs to match the policy.
  5. Align backup expiration; otherwise deleted data remains in snapshots.
  6. Test cleanup against non-production terminal runs.
  7. Alert on cleanup failures and unexpected storage growth.