clone_stack
Clone a stack from the current cluster to another cluster in the organisation as a stack DRAFT. Nothing is deployed on the target unless deploy_after_clone is set: the result is a saved draft visible on the target cluster's Stacks page. The user must hold ai.execute and stacks.write on the target cluster. Addon configurations are included; encrypted values that cannot be transferred are stripped with warnings, and name conflicts on the target are auto-resolved with suffixes. By default the clone carries CONFIGURATION ONLY and none of the stack's volumes or databases. Set include_data to true to carry the data too: Ankra takes a restore point of the source stack and restores it onto the clone, which additionally needs backups.operate and is refused when the target cluster already has a stack of this name. Review and apply the draft on the target cluster to deploy it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes | Ankra cluster id (UUID) the call targets. Discover ids with list_clusters. | |
| stack_name | Yes | Name of the stack on the current cluster to clone. | |
| include_data | No | Carry the stack's DATA as well as its configuration. Ankra takes a fresh restore point of the source stack and restores it onto the clone, and the result carries the run that does it. Default false, which copies configuration only. Needs the backups.operate permission and a ready backup vault, and is refused when the target cluster already has a stack of this name. | |
| data_selection | No | Which data the clone carries. Omitting this key is NOT the same as sending an empty object: omit it to take the stack's own backup policy, and send one only to override that policy. A selection is applied WHOLE and never merged, so one that names no persistent_volume_claims carries no volumes. | |
| new_stack_name | No | Optional name for the cloned stack on the target cluster. Defaults to the source name; auto-renamed on conflict. | |
| protect_source | No | Turn backup protection on for the SOURCE stack when it has none, so the restore point this clone takes is the first of a series rather than a one-off. Default false. | |
| backup_vault_id | No | UUID of the backup vault the clone's restore point lives in. Omit to use the stack's own backup policy vault, and then the organisation's only ready vault. | |
| data_clone_mode | No | Where the data comes from when include_data is true. 'fresh' (the default) takes a new restore point of the source stack now. 'latest' restores the newest complete restore point the source already has, reading nothing from the source cluster; anything written since is not in it. | |
| target_cluster_id | Yes | UUID of the cluster to clone the stack to (must differ from the current cluster). | |
| deploy_after_clone | No | Deploy the cloned stack on the target once the clone lands - after the restore when include_data is true. Default false, which leaves a draft to review and apply. |