Skip to main content

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​

ParameterRequiredDescriptionDefault
-e, --env-id <envId>NoEnvironment ID—
-s, --service-name <serviceName>NoService name; reads cloudbaserc.json when omitted, otherwise prompts—
--rollback-version-name <versionName>NoTarget version name; prompts when omitted—
--current-version-name <versionName>NoCurrent online version name; fetched automatically, prompts on failureAuto
--operator-remark <remark>NoOperator remark—
--forceNoSkip the confirmation and submit the rollbackfalse
--jsonNoOutput JSONfalse

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 TaskId to track it, the version switch is not synchronous
  • Rolls back by version name, unlike the canary traffic fallback of tcb cloudrun traffic rollback
  • Without --force the CLI asks for confirmation of the target version