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
| Parameter | Description | Required |
|---|---|---|
-e, --env-id <envId> | Environment ID | No |
-s, --service-name <serviceName> | Service name. If omitted, it is read from cloudbaserc.json first, then requested interactively | No |
--rollback-version-name <versionName> | Target rollback version. If omitted, it is requested interactively | No |
--current-version-name <versionName> | Current online version. The CLI obtains it automatically when omitted, then requests it interactively if needed | No |
--operator-remark <remark> | Operation remark | No |
--force | Skip confirmation and submit the rollback task directly | No |
--json | Output in JSON format | No |
-h, --help | Display command help | No |
Notes
- A successful command only indicates that the rollback task has been submitted. Use the returned
TaskIdto 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.