opschain admin migrate-logs start
Included from Basic tier
Starts the migrate-and-verify sweep. The verb flips durable state and
returns; the cluster-singleton worker inside the server then walks the
estate's owning attempts newest first (recent history is what operators
actually read), re-encodes each owner's log_lines into sealed segments in
the blob store, verifies line count and content digest source against the
stored segments, and records the verdict in the evidence table. Nothing is
deleted — source rows stay authoritative and redundant until the separate
purge verb.
A workflow run and its spawned changes (and a generate-actions task and its
mintmodel concretise partner) flip from log_lines to segments in one
transaction, so unioned reads never see a half-migrated family.
Starting refuses while the migration is already running or paused (resume
instead) and while a purge is active. Starting again after completed runs a
fresh sweep from the newest group — already-verified owners are skipped from
the evidence table, so a re-run is a cheap re-verification pass.
Flags
| Flag | Meaning |
|---|---|
--server <url> | Server base URL (default: the active context / OPSCHAIN_SERVER). |
--auth-token <token> | Admin bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login). |
--batch-groups <n> | Owning runs per worker batch (0 keeps the stored knob; default 25). |
Prints the status document after the flip (-o json / -o yaml for the full
shape). For off-peak windowing, pause before the window closes and resume
inside the next one — the cursor is durable.
Exit codes
| Code | Meaning |
|---|---|
| 0 | The sweep was started. |
| 1 | Refused (already running/paused, purge active, store not PostgreSQL), request failed, or the token was rejected. |
| 2 | Usage error — no server or no credential resolvable. |
Examples
opschain admin migrate-logs start
opschain admin migrate-logs start --batch-groups 100
See also
opschain docs cli/admin-migrate-logs-status— watching the sweep.opschain docs cli/admin-migrate-logs-purge— the separate deletion phase.