units get downloads a ZIP of every resource attached to a unit; tasks get downloads one task’s sheet by default, or its linked resources with --resources.
ontrack units, ontrack tasks.
--dest vs. -o/--output
These control two different files:
--dest <path>is where the downloaded content (the ZIP or the task sheet PDF) is written. It’s specific tounits getandtasks get.-o, --output <file>is the global flag that writes the command’s own result — the JSON, YAML or table describing what happened — to a file instead of stdout. It works on every command.
--dest places the file, -o captures the confirmation record.
--dest, units get writes ontrack-resources-<project-id>.zip and tasks get writes the filename OnTrack reports for the task’s sheet or resources, both in the current directory.
Refusing to overwrite
A download refuses to replace an existing file at the destination:--force to replace it.
How --force replaces a file
Every download writes to a temporary file next to the destination first, then either:
- links it to the destination (default) — this fails if the destination exists, which is the second overwrite guard above, or
- renames it onto the destination (
--force) — an atomic replace, so a reader never sees a half-written file.
Ctrl-C.
A task with no task sheet or no resources returns an
upstream_api error rather than an empty file. See Troubleshooting for that and other error codes.