Skip to main content

Roll Back to a Version

Use tcb cloudrun version rollback to submit a rollback task that restores the current online version of a Cloud Hosting service to a specified historical version.

Basic Usage

tcb cloudrun version rollback -e <envId> -s <serviceName> --rollback-version-name <versionName>

Examples

# Roll back to a historical version; the CLI obtains the current online version automatically
tcb cloudrun version rollback -e env-123456 -s my-service --rollback-version-name my-service-001

# Specify 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

Command Parameters

ParameterDescriptionRequired
-e, --env-id <envId>Environment IDNo
-s, --service-name <serviceName>Service name. If omitted, it is read from cloudbaserc.json first, then requested interactivelyNo
--rollback-version-name <versionName>Target rollback version. If omitted, it is requested interactivelyNo
--current-version-name <versionName>Current online version. The CLI obtains it automatically when omitted, then requests it interactively if neededNo
--operator-remark <remark>Operation remarkNo
--forceSkip confirmation and submit the rollback task directlyNo
--jsonOutput in JSON formatNo
-h, --helpDisplay command helpNo

Notes

  • A successful command only indicates that the rollback task has been submitted. Use the returned TaskId to track it; version switching is asynchronous.
  • This command rolls back to a specified historical version. It differs from tcb cloudrun traffic rollback, which rolls back canary traffic.
  • Without --force, the CLI asks for confirmation.