borg-backup-ui icon indicating copy to clipboard operation
borg-backup-ui copied to clipboard

Log actual Borg invocations with redaction and correlated exit codes

Open borg-codex-bot opened this issue 1 month ago • 0 comments

Log the actual Borg argument vector immediately before process startup, with a matching exit record, in managed backup execution and manually started repository maintenance.

  • Add consistent BORG_EXEC and BORG_EXIT records with an invocation identifier.
  • Preserve argument boundaries with shell quoting and escape control characters to prevent forged log lines.
  • Redact credentials and sensitive command arguments before formatting; never log the process environment.
  • Record actual process exit codes, signals and startup failures without changing backup/cancellation behavior.
  • Keep command evidence available in persisted job logs, maintenance results and existing support exports.
  • Cover create, prune, compact, check and runtime diagnostic Borg calls. Keep execution arguments unchanged.

User impact: inspect the actual invocation used by a backup or maintenance run, excluding deliberately masked credentials. Changelog: user-visible; pending release-note fragment required.

This work builds on the pending live-metrics PR #647 so the next test candidate preserves that feature. No stable promotion without explicit maintainer test approval.

borg-codex-bot avatar Oct 30 '26 07:10 borg-codex-bot