Loads application config, starts the configured Ecto repo, and writes an export file
using Threadline.Export — no ad-hoc Ecto.Query in this task (parity with
mix threadline.retention.purge).
Flags
--output PATH/-o— required when not using--dry-run(destination file). Do not paste production secrets into shell history; prefer argv from env files or wrappers for--actor-jsonpayloads.--format—csvorjson(defaultjsonwhen writing a file).--json-format—wrapped(default) orndjson(passed asjson_format:to export).--max-rows— forwarded as:max_rows(default fromThreadline.Export).--dry-run— counts matching rows viaThreadline.Export.count_matching/2; does not write a file.--table— optional table name filter (string), same astimeline/2:table.--from/--to— optional inclusivecaptured_atbounds as ISO-8601 UTC strings.--actor-json PATH— optional UTF-8 file; contents decoded withJason.decode!/1and passed throughThreadline.Semantics.ActorRef.from_map/1as:actor_refin filters.
Examples
mix threadline.export --dry-run --table users
mix threadline.export --format csv --output /tmp/audit.csv --table users
mix threadline.export --format json --json-format ndjson -o /tmp/lines.ndjson --max-rows 5000Non-production: always review MIX_ENV, repo module, and printed counts before writing.