autonomy audit prune

Delete audit records older than a retention threshold

Synopsis

Removes audit records with event_time older than –older-than from the PostgreSQL audit_events table.

–pg-url (or AUTONOMY_AUDIT_PG_URL) is required. File-based records are not pruned by this command; use standard filesystem retention tools for those. The supplied PostgreSQL role must be a maintenance identity with DELETE access to audit_events (for example audit_retention_role); orchestrator_role remains append-only and cannot prune retained history.

The –older-than flag accepts a duration string: e.g. 90d, 30d, 365d. Only days are supported (suffix “d”). This matches the 90-day default retention period in the file-based store.

Example: autonomy audit prune –pg-url “postgresql://…” –older-than 90d

Usage

autonomy audit prune [flags]

Options

      --older-than string   delete records older than this retention period (e.g. 90d, 30d, 365d) (default "90d")
      --pg-url string       PostgreSQL URL for DB-backed audit store (env: AUTONOMY_AUDIT_PG_URL)

See also