diff --git a/runner/harness/abra.py b/runner/harness/abra.py index 42f384f..f90cd16 100644 --- a/runner/harness/abra.py +++ b/runner/harness/abra.py @@ -184,7 +184,13 @@ def backup_create(domain: str, timeout: int = 900) -> str: # remote and fails "authentication required: Unauthorized". Returns the captured output, whose # restic JSON summary line carries the produced "snapshot_id" (the backup artifact, DG3) — note # `abra app backup snapshots` needs a TTY and is awkward to script, so we read the create output. - return _run_pty(["app", "backup", "create", domain, "-n", "-C", "-o"], timeout=timeout).stdout + out = _run_pty(["app", "backup", "create", domain, "-n", "-C", "-o"], timeout=timeout).stdout or "" + # Echo the backup output (incl. backupbot's pre-hook run / any "Failed to run command" or + # "Container ... not running" ERROR) into the run log. Backup is otherwise opaque: a pre-hook that + # fails to register/run leaves the DB dump out of the snapshot, surfacing only as a downstream + # restore RED with no cause. Bounded tail keeps it readable. + print(f" [backup output]\n{out[-4000:]}", flush=True) + return out def restore(domain: str, timeout: int = 900) -> None: