Skip to main content

Detach

Detaches a child tenant. The database is kept and can be re-attached with Attach.

Examples

Basic usage:

octo-cli -c Detach -tid "newtenant"

Options

ShortLongRequiredDescription
-tid--tenantIdyesId of tenant

Notes

Refused with HTTP 409 while Stream Data, Communication, Reporting or AI Services is still enabled for the tenant; the error names the enabled capabilities. Disable them first with DisableStreamData / DisableCommunication / DisableReporting / DisableAi. Those commands act on the tenant of the active context, so switch to the tenant being detached with UseContext or pass --context <name>.

If the tenant's data is still needed, take a backup with Dump before disabling the capabilities and detaching; Dump works regardless of capability state.

Answers 404 when the tenant is not a child of the current tenant.

Re-attaching with Attach requires the database name (-db); read it from GetTenants before detaching, Detach does not print it.