huawei-cbr-backup-restore
Discover, configure, execute, validate and restore Huawei Cloud CBR backups for supported ECS, EVS and CCE node scenarios.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Discover, configure, execute, validate and restore Huawei Cloud CBR backups for supported ECS, EVS and CCE node scenarios.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage Huawei Cloud resources through KooCLI. Discover before acting — always query existing resources before creating. Use dryrun to validate, waiter to poll async operations.
Build HuaweiCloud multi-account landing zone Terraform code with modular governance (OUs, accounts, SCP, IAM, Identity Center) and per-account infrastructure (VPC, compute, tagging)
Discover, plan, deploy, validate and configure a Huawei Cloud DWS cluster using verified hcloud CLI operations and controlled approval gates.
Analyze capability gaps from migration skills and prepare MCP extensions or new MCPs in a controlled, non-executing manner
Discover, plan, execute under human supervision, validate and recover Huawei Cloud cross-region disaster recovery scenarios using SDRS (Storage Disaster Recovery Service) capabilities.
Migrate object storage to Huawei Cloud OBS using OMS (Object Migration Service). Handles cross-cloud (AWS, Azure, Aliyun, Tencent, GCP, on-prem HTTP) S3/bucket migration with Terraform automation, consistency checks, and post-migration verification. Use when the user wants to migrate or replicate objects/buckets to Huawei Cloud OBS.
| name | huawei-cbr-backup-restore |
| version | 1.0.0 |
| description | Discover, configure, execute, validate and restore Huawei Cloud CBR backups for supported ECS, EVS and CCE node scenarios. |
| category | migration |
| risk_level | high |
| status | READY_WITH_WARNINGS |
| requires_explicit_approval | true |
| license | Apache-2.0 |
| compatibility | ["OpenCode","Hermes"] |
| metadata | {"domain":"Cloud-Foundation","family":"DR-and-Backup","service":"CBR","risk_level":"high","status":"READY_WITH_WARNINGS","verified_hcloud_version":"6.2.9","newer_version_validation_pending":"7.2.12"} |
Discover, configure, execute, validate and restore Huawei Cloud CBR (Cloud Backup and Recovery) backups for supported ECS, EVS and CCE node scenarios, using hcloud CLI as the primary mechanism.
None. CBR operations are performed via hcloud CLI.
CBR supports protection of ECS (OS::Nova::Server), EVS (OS::Cinder::Volume), and specific CCE-related resources; the exact resource types available must be discovered per region before creating the vault. [VERIFIED_FROM_LOCAL_HELP] [REGION_DEPENDENT]
The vault must use a region compatible with the protected resources. Never assume cross-region compatibility for direct association. [VERIFIED_FROM_LOCAL_HELP] [REGION_DEPENDENT]
The resource state should be validated before backup; verify the expected state for the resource type and backup mode before proceeding. When the backup type may require an active instance, confirm the state rather than assuming compatibility. [INFERRED]
A restore must be treated as creation or recovery toward a new resource or an explicitly selected target. Never assume the original resource will be overwritten. [VERIFIED_FROM_LOCAL_HELP]
Cross-region copy or replication requires specific capabilities and resources in the destination region. Validate first with ShowReplicationCapabilities. [VERIFIED_FROM_LOCAL_HELP]
Differentiate ad-hoc backups from scheduled policies. Policies must declare schedule, retention, and expiration behavior. [VERIFIED_FROM_LOCAL_HELP]
A backup related to CCE nodes protects associated disks or resources, but should not be assumed to replace a Kubernetes logical state backup strategy; verify what is and is not covered for the specific CCE backup type. [INFERRED]
For EVS, verify attachment status, volume state, and compatibility before initiating backup; the exact preconditions may vary by volume type and region. [INFERRED]
Verify vault capacity, quota, and usage before creating a checkpoint; the available capacity may not match the displayed capacity in all cases. [INFERRED]
Incremental backups depend on a valid backup chain and a successful base backup. Do not delete dependencies without validating the chain; breaking the chain may affect subsequent incremental backups. [INFERRED]
DISCOVER BEFORE CREATE: never hardcode vault IDs, resource IDs, backup IDs, or policy IDs. Always resolve names to IDs via read operations first. [VERIFIED_FROM_LOCAL_HELP]
VERIFY AFTER EVERY STEP: each write operation must have a corresponding List or Show operation afterward to confirm the result. [VERIFIED_FROM_LOCAL_HELP]
Every write operation requires explicit approval before execution. [VERIFIED_FROM_LOCAL_HELP]
Before restore, generate a rollback and impact plan. Do not execute restore without documented plan and approval; the exact impact may vary by resource type and restore mode. [INFERRED]
Never include secrets (AK, SK, tokens, passwords, project IDs, private keys) in commands, examples, files, or logs; use secure input mechanisms where available. [INFERRED]
| Tool or resource | Required | Purpose | Verification |
|---|---|---|---|
| hcloud CLI 6.2.9 | Yes | All CBR operations | hcloud version |
| Huawei Cloud authentication | Yes | API access | hcloud CBR ListVault --cli-region=<REGION> |
| Target region | Yes | CBR vault and resource region | Specified in intent |
| Project or enterprise project context | Yes | Resource scoping | hcloud CBR ListVault --cli-region=<REGION> |
| CBR service availability | Yes | Service enabled in region | hcloud CBR ListVault --cli-region=<REGION> |
| Source ECS, EVS, or CCE resource | Yes | Resource to protect | hcloud CBR ListProtectable |
| IAM permissions | Yes | CBR read/write, ECS/EVS read | Verified by successful ListVault |
| Vault quota | Yes | Sufficient capacity for backups | hcloud CBR ShowVault |
| Backup quota | Yes | Sufficient backup count | hcloud CBR ListBackups |
| huaweicloud-pricing MCP | No | Cost estimation | MCP availability check |
| huaweicloud-ticket MCP | No | Support ticket creation | MCP availability check |
| huaweicloud-deploy MCP | No | Infrastructure prerequisites (VPC/SG) | MCP availability check |
Classification: AUTOMATED
Objective: Extract and validate all required and optional inputs for the backup or restore operation.
Inputs: User request specifying resource type, region, resource name, backup type, schedule, retention, cross-region requirements, restore requirements, approval owner.
Preconditions: None.
Command: None (parsing logic).
Approval requirement: None.
Verification: Confirm all required fields are present.
Expected result: Complete intent object with all required fields populated.
Failure action: If critical information is missing, STOP and request clarification. Do not invent values.
Evidence artifact: artifacts/cbr-intent.json
Extract:
If critical information is missing: do not invent, request clarification, stop write operations.
Classification: ASSISTED
Objective: Verify hcloud CLI version, authentication, region, project context, and CBR service availability.
Inputs: source_region from intent.
Preconditions: hcloud CLI installed.
Commands (read-only):
hcloud version
hcloud CBR ListVault --cli-region=<SOURCE_REGION> --limit=1
Approval requirement: None.
Verification: Confirm version is 6.2.9+, confirm region returns vault list (even if empty), confirm CBR is available.
Expected result: Authentication valid, region accessible, CBR service available.
Failure action: STOP. Report authentication or region error.
Evidence artifact: artifacts/cbr-auth-discovery.json
Classification: ASSISTED
Objective: Discover the source ECS, EVS, or CCE resource and resolve name to ID.
Inputs: resource_type, source_resource_name, source_region.
Preconditions: Step 2 completed successfully.
Commands (read-only):
For ECS:
hcloud ECS ListServersDetails --cli-region=<SOURCE_REGION>
For EVS:
hcloud EVS ListVolumes --cli-region=<SOURCE_REGION>
For CCE:
hcloud CCE ListClusters --cli-region=<SOURCE_REGION>
Also discover protectable resources:
hcloud CBR ListProtectable --cli-region=<SOURCE_REGION> --protectable_type=<TYPE>
Approval requirement: None.
Verification:
Expected result: source_resource_id resolved, resource state validated.
Failure action: STOP. Report zero matches, ambiguous matches, or incompatible state.
Evidence artifact: artifacts/cbr-source-discovery.json
Classification: ASSISTED
Objective: List existing vaults, policies, backups, and regional capabilities to apply DISCOVER BEFORE CREATE.
Inputs: source_region, resource_type.
Preconditions: Step 3 completed successfully.
Commands (read-only):
hcloud CBR ListVault --cli-region=<SOURCE_REGION>
hcloud CBR ListPolicies --cli-region=<SOURCE_REGION>
hcloud CBR ListBackups --cli-region=<SOURCE_REGION>
hcloud CBR ShowReplicationCapabilities --cli-region=<SOURCE_REGION>
Approval requirement: None.
Verification: Catalog existing resources. If a compatible vault exists, present reuse option.
Expected result: Complete inventory of existing vaults, policies, backups, and capabilities.
Failure action: Continue with empty results (no existing resources is valid).
Evidence artifact: artifacts/cbr-existing-resources.json
Apply DISCOVER BEFORE CREATE:
Classification: AUTOMATED
Objective: Build a vault plan with name, type, capacity, billing, region, project, tags, reuse decision, quota impact, and estimated cost.
Inputs: Intent, source discovery, existing resources.
Preconditions: Steps 1-4 completed.
Command: None (plan generation logic).
Approval requirement: None (plan only, no execution).
Verification: Plan contains all required fields.
Expected result: Vault plan document ready for review.
Failure action: STOP. Report planning error.
Evidence artifact: artifacts/cbr-vault-plan.md
Plan includes:
Classification: ASSISTED
Objective: Create a new vault or reuse an existing one based on the plan.
Inputs: Vault plan, approval.
Preconditions: Step 5 plan approved.
If reusing:
If creating:
hcloud CBR CreateVault --cli-region=<SOURCE_REGION> \
--vault.name='<VAULT_NAME>' \
--vault.billing.consistent_with_server=false \
--vault.billing.charging_mode=<CHARGING_MODE> \
--vault.billing.size=<CAPACITY_GB> \
--vault.resource_type=<RESOURCE_TYPE> \
--vault.prot_type=<PROTECT_TYPE>
Verification (after creation or reuse):
hcloud CBR ShowVault --cli-region=<SOURCE_REGION> --vault_id=<VAULT_ID>
Confirm: ID resolved, status active, capacity matches, region matches.
Expected result: Vault ID resolved and validated.
Failure action: STOP. Preserve error evidence. Do not continue.
Evidence artifact: artifacts/cbr-vault-result.json
Classification: ASSISTED
Objective: Associate the source resource with the vault.
Inputs: vault_id, source_resource_id, resource_type.
Preconditions: Step 6 completed. Resource not already associated with an incompatible vault.
Before associating:
Approval requirement: EXPLICIT.
Command:
hcloud CBR AddVaultResource --cli-region=<SOURCE_REGION> \
--vault_id=<VAULT_ID> \
--resources='[{"id":"<RESOURCE_ID>","type":"<RESOURCE_TYPE>"}]'
Verification:
hcloud CBR ShowVault --cli-region=<SOURCE_REGION> --vault_id=<VAULT_ID>
Confirm: Resource appears in vault resource list.
Expected result: Resource successfully associated with vault.
Failure action: STOP. Report association error.
Evidence artifact: artifacts/cbr-association-result.json
Classification: ASSISTED
Objective: Create a scheduled policy or confirm ad-hoc backup mode.
Inputs: backup_type, schedule, retention, vault_id.
Preconditions: Step 7 completed.
For ad-hoc backup: Skip policy creation. Document as ad-hoc.
For scheduled policy:
Command:
hcloud CBR CreatePolicy --cli-region=<SOURCE_REGION> \
--policy.name='<POLICY_NAME>' \
--policy.enabled=<ENABLED> \
--policy.trigger.properties.schedule='<SCHEDULE>' \
--policy.trigger.type=time \
--policy.operation_definition.retention_duration_days=<RETENTION_DAYS>
Associate policy with vault:
hcloud CBR AssociateVaultPolicy --cli-region=<SOURCE_REGION> \
--vault_id=<VAULT_ID> \
--policy_id=<POLICY_ID>
Verification:
hcloud CBR ShowPolicy --cli-region=<SOURCE_REGION> --policy_id=<POLICY_ID>
Confirm: schedule matches, retention matches, enabled state matches.
Expected result: Policy created and associated, or ad-hoc mode confirmed.
Failure action: STOP. Report policy creation error.
Evidence artifact: artifacts/cbr-policy-result.json
Classification: ASSISTED
Objective: Execute an ad-hoc backup (CreateCheckpoint) or confirm scheduled backup is active.
Inputs: vault_id, backup_type.
Preconditions: Steps 7-8 completed.
For ad-hoc:
Command:
hcloud CBR CreateCheckpoint --cli-region=<SOURCE_REGION> \
--vault_id=<VAULT_ID>
For scheduled: Confirm policy is enabled and next run time.
Verification: Poll backup status.
hcloud CBR ListBackups --cli-region=<SOURCE_REGION> --vault_id=<VAULT_ID> --status=available
Polling:
hcloud CBR ShowBackup --backup_id=<BACKUP_ID> or ListBackups with filterExpected result: Backup ID resolved, status available.
Failure action: STOP. Report backup failure with error details.
Evidence artifact: artifacts/cbr-backup-result.json
Classification: ASSISTED
Objective: Validate backup integrity, metadata, and consistency.
Inputs: backup_id.
Preconditions: Step 9 completed.
Commands (read-only):
hcloud CBR ShowBackup --cli-region=<SOURCE_REGION> --backup_id=<BACKUP_ID>
Validate:
Expected result: Backup fully validated.
Failure action: STOP. Report validation failure.
Evidence artifact: artifacts/cbr-backup-validation-report.md
Classification: AUTOMATED
Objective: Build a restore plan with impact analysis and rollback strategy.
Inputs: backup_id, restore requirements from intent.
Preconditions: Step 10 completed.
Before restore:
Expected result: Restore plan document ready for approval.
Failure action: STOP. Report planning error.
Evidence artifact: artifacts/cbr-restore-plan.md
Classification: ASSISTED
Objective: Execute the restore operation to create a new resource from the backup.
Inputs: backup_id, restore_plan.
Preconditions: Step 11 plan approved.
Approval requirement: EXPLICIT.
Command:
hcloud CBR RestoreBackup --cli-region=<SOURCE_REGION> \
--backup_id=<BACKUP_ID> \
--restore='<RESTORE_SPEC>'
Verification: Poll restore status.
hcloud CBR ShowBackup --cli-region=<SOURCE_REGION> --backup_id=<BACKUP_ID>
Monitor restore:
Expected result: Restore completed, new resource created.
Failure action: STOP. Preserve original resource. Report restore failure.
Evidence artifact: artifacts/cbr-restore-result.json
Classification: ASSISTED
Objective: Validate the restored resource is functional and matches expectations.
Inputs: restored_resource_id, resource_type.
Preconditions: Step 12 completed.
For ECS:
hcloud ECS ListServersDetails --cli-region=<SOURCE_REGION>For EVS:
hcloud EVS ListVolumes --cli-region=<SOURCE_REGION>For CCE-related:
Expected result: Restored resource fully validated.
Failure action: Report validation failure. Do NOT delete restored resource automatically.
Evidence artifact: artifacts/cbr-restore-validation-report.md
Classification: AUTOMATED
Objective: Generate final summary, evidence, and follow-up actions.
Inputs: All artifacts from Steps 1-13.
Preconditions: All previous steps completed.
Generate:
Do NOT delete backups, vaults, or restored resources automatically.
Expected result: Complete closure report.
Evidence artifact: artifacts/cbr-final-report.md
When a capability required for CBR backup/restore is not available in existing MCPs:
Known capability gaps:
| Symptom | Likely cause | Diagnosis | Resolution |
|---|---|---|---|
| Authentication failure | hcloud config or IAM issue | hcloud version and test command | Verify hcloud config, region, IAM permissions |
| Resource not found | Wrong name, region, or enterprise project | hcloud CBR ListProtectable | Verify resource name, region, enterprise project |
| Multiple matches for resource name | Ambiguous naming | List results with matching name | Present all matches, do not auto-select |
| Vault creation fails | Quota, capacity, or billing issue | hcloud CBR ShowVault error | Check quota, capacity, billing mode |
| Association fails | Vault/resource type or region mismatch | ShowVault resource list | Verify vault type, resource type, region compatibility |
| Backup fails or stuck | Vault capacity, resource state, or agent | hcloud CBR ShowBackup status | Check vault capacity, resource state, agent status |
| Restore fails | Backup integrity, target AZ, or network | Restore error details | Check backup integrity, target AZ, network, quota |
| Cross-region copy fails | Replication capability or egress quota | ShowReplicationCapabilities | Validate destination region, check egress quota |
| Policy creation fails | Schedule syntax or retention params | hcloud CBR ShowPolicy error | Validate schedule syntax, retention parameters |
| Vault capacity insufficient | Quota exceeded or backup size | hcloud CBR ShowVault usage | Request quota increase or clean up old backups |
See also: docs/known-issues.md
Status: READY_WITH_WARNINGS
Evidence: