tcb cloudrun version rollback
Submit a version rollback task that switches the online version of a CloudBase Run service to a specific historical version.
Usage
tcb cloudrun version rollback -e <envId> -s <serviceName> --rollback-version-name <versionName>
Parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
-e, --env-id <envId> | No | Environment ID | — |
-s, --service-name <serviceName> | No | Service name; reads cloudbaserc.json when omitted, otherwise prompts | — |
--rollback-version-name <versionName> | No | Target version name; prompts when omitted | — |
--current-version-name <versionName> | No | Current online version name; fetched automatically, prompts on failure | Auto |
--operator-remark <remark> | No | Operator remark | — |
--force | No | Skip the confirmation and submit the rollback | false |
--json | No | Output JSON | false |
Examples
# Roll back to a historical version, current version fetched automatically
tcb cloudrun version rollback -e env-123456 -s my-service --rollback-version-name my-service-001
# State the current online version explicitly
tcb cloudrun version rollback -e env-123456 -s my-service --current-version-name my-service-002 --rollback-version-name my-service-001
# Skip confirmation and output JSON
tcb cloudrun version rollback -e env-123456 -s my-service --rollback-version-name my-service-001 --force --json
Notes
- Success means the rollback task was submitted; use the returned
TaskIdto track it, the version switch is not synchronous - Rolls back by version name, unlike the canary traffic fallback of
tcb cloudrun traffic rollback - Without
--forcethe CLI asks for confirmation of the target version