How are you getting the job run id ?
First I get the job DB Key :
DeployJob findByGroupAndName ...
Then I get the Job Run DB Key with :
JobRun findLastRunByJobKey $jobDBKey
Finally I get the Job Run Id with :
JobRun jobRunKeyToJobRunId $JobRunDBKey
I just noticed something :
The command :
Utility exportDeployResults $jobDBKey $jobRunDBKey $fileToExportTo
Gives (in the export file) the good content and log level if the job Run succeeded but gives only a header and no log in case of failure.
In my case, the failure occurs for a target server located behind a repeater, when the connection between the repeater and the target is broken.
OK, I know why the export deploy results is sometimes so laconic.
It is because the parent deploy job has a logging level option set to "Errors Only" instead of "All Information".
So it has nothing to see with exporting a job run manually or using BLCLI, it seems.