Skip to content
Cloud & Infrastructure
Skill

/alibabacloud-ecs-disaster-recovery-image

阿里云 ECS 跨可用区灾备恢复技能。从现有 ECS 实例创建系统镜像,并在不同可用区部署新实例。 当用户提到以下场景时使用:可用区故障恢复、跨可用区备份、跨可用区实例克隆、ECS 灾备、 用镜像在其他可用区创建实例、"帮我做个镜像然后换个可用区创建实例"等。 也适用于:灾备实例、镜像备份、换个可用区创建实例、可用区容灾、 制作镜像、跨可用区创建、从镜像创建实例。 注意:本技能是"备份"而非"迁移",不会释放或影响原始实例的资源。

From plugin
alibabacloud-aiops-skills
213200 skills
Install
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-ecs-disaster-recovery-image --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/alibabacloud-ecs-disaster-recovery-image

Context preview

The summary Claude sees to decide when to auto-load this skill.

阿里云 ECS 跨可用区灾备恢复技能。从现有 ECS 实例创建系统镜像,并在不同可用区部署新实例。 当用户提到以下场景时使用:可用区故障恢复、跨可用区备份、跨可用区实例克隆、ECS 灾备、 用镜像在其他可用区创建实例、"帮我做个镜像然后换个可用区创建实例"等。 也适用于:灾备实例、镜像备份、换个可用区创建实例、可用区容灾、 制作镜像、跨可用区创建、从镜像创建实例。 注意:本技能是"备份"而非"迁移",不会释放或影响原始实例的资源。

SKILL.md

alibabacloud-ecs-disaster-recovery-image.SKILL.md
name: alibabacloud-ecs-disaster-recovery-image
description: |
  阿里云 ECS 跨可用区灾备恢复技能。从现有 ECS 实例创建系统镜像,并在不同可用区部署新实例。
  当用户提到以下场景时使用:可用区故障恢复、跨可用区备份、跨可用区实例克隆、ECS 灾备、
  用镜像在其他可用区创建实例、"帮我做个镜像然后换个可用区创建实例"等。
  也适用于:灾备实例、镜像备份、换个可用区创建实例、可用区容灾、
  制作镜像、跨可用区创建、从镜像创建实例。
  注意:本技能是"备份"而非"迁移",不会释放或影响原始实例的资源。

ECS Cross-AZ Disaster Recovery (Whole-Instance Image)

1. Scenario

This Skill guides the user through creating a **whole-instance image** (system disk + all data disks) from an existing ECS instance, and deploying a new instance in **a different availability zone within the same region** using that image, to achieve AZ-level disaster recovery. The original instance and all its resources remain **completely untouched** -- this is a **backup**, not a migration.

**Architecture**: ECS Source Instance -> ECS Custom Image (full disk mappings) -> ECS New Instance (target zone) + VSwitch (existing or newly created in source VPC)

**Key characteristics**:

  • No downtime: `create-image` supports Running instances
  • Whole-instance image: automatically includes mappings for the system disk and all data disks
  • Single-shot creation: use `run-instances --data-disk Device=...` to **override** disk Category/PL on the image during instance creation, avoiding separate disk attachment
  • All parameters explicit: network / billing / bandwidth / disk PL are read from the source instance and reused

2. Installation

> **Pre-check: Aliyun CLI >= 3.3.3 required** > 1. Run `aliyun version` to check whether the CLI is installed and verify the version > 2. If not installed: notify the user, and after user confirmation run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash`, or refer to [references/cli-installation-guide.md](references/cli-installation-guide.md) > 3. If installed but version < 3.3.3: report the current version and the minimum requirement, then upgrade after user confirmation > 4. If installed and version >= 3.3.3: proceed to the next step

> **[MUST] Pre-check: Aliyun CLI plugin update** > ```bash > aliyun configure set --auto-plugin-install true > aliyun plugin update > ```

3. Environment Variables

This Skill does not require any environment variables; all parameters (RegionId, etc.) are passed explicitly on the command line. **Do NOT** use `export ALIBABA_CLOUD_USER_AGENT=...`, because environment variables do not survive across separate bash invocations in multi-agent clients.

4. Authentication

> **Pre-check: Alibaba Cloud Credentials Required** > > **Security Rules:** > - **NEVER** read, echo, or print AK/SK values (e.g., `echo $ALIBABA_CLOUD_ACCESS_KEY_ID` is FORBIDDEN) > - **NEVER** ask the user to input AK/SK directly in the conversation or command line > - **NEVER** use `aliyun configure set` with literal credential values > - **ONLY** use `aliyun configure list` to check credential status > > ```bash > aliyun configure list > ``` > Inspect the output for a valid profile (AK / STS / OAuth identity). > > **If no valid profile exists, STOP here:** > 1. Obtain credentials from the [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak) > 2. Configure credentials **outside of this session** (via `aliyun configure` in a terminal or environment variables in the shell profile) > 3. Return and re-run after `aliyun configure list` shows a valid profile

5. RAM Policy

RAM Actions used by this Skill (detailed resource scoping and policy JSON are in [references/ram-policies.md](references/ram-policies.md)):

| Action | Purpose | |--------|---------| | `ecs:DescribeInstances` | Query the source instance / verify the new instance | | `ecs:DescribeDisks` | Query disks on the source / new instance | | `ecs:CreateImage` | Create a whole-instance image from the source instance | | `ecs:DescribeImages` | Monitor image creation progress | | `ecs:DescribeAvailableResource` | Check stock in the target availability zone | | `ecs:DescribeVSwitches` | List VSwitches under the VPC | | `ecs:RunInstances` | Create the new instance in the target availability zone | | `vpc:CreateVSwitch` | Create a VSwitch when none exists in the target zone |

> **[MUST] Permission Failure Handling:** When any command or API call fails due to permission errors at any point during execution, follow this process: > 1. Read [references/ram-policies.md](references/ram-policies.md) to obtain the full list of permissions required by this Skill > 2. Use the `ram-permission-diagnose` skill to guide the user through requesting the necessary permissions > 3. Pause and wait until the user confirms that the required permissions have been granted

6. Parameter Confirmation

> **IMPORTANT: Parameter Confirmation** -- Before executing any command or API call, > ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, > passwords, domain names, resource specifications, etc.) MUST be confirmed with the > user. Do NOT assume or use default values without explicit user approval.

| Parameter | Required/Optional | Description | Default | |-----------|-------------------|-------------|---------| | `InstanceId` | Required | Source ECS instance ID | N/A | | `RegionId` | Required | Region of the source instance | N/A | | `TargetZoneId` | Required (chosen by the user in Step 5) | Target availability zone (must differ from source) | N/A | | `ImageName` | Optional | Image name | `Create_from_<instance-id>` | | `InstanceName` | Optional | New instance name | `recovery-<original-name>` | | `InstanceType` | Optional | New instance type (defaults to source type) | Source instance `InstanceType` | | `VSwitchId` | Optional | Existing VSwitch in target zone (otherwise must be created) | From `describe-vswitches` | | `CidrBlock` | Conditional | Confirmed by the user when a new VSwitch must be created | Confirmed by the user |

User Interaction Pattern

> **[MUST] Every user decision point must use `AskUserQuestion` with 2-4 clickable options.** > - Never just "stop and ask" -- always present clear, clickable

Read more
Ships withalibabacloud-aiops-skills

Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.

Get the whole plugin

Other skills on alibabacloud-aiops-skills.