backup-restore

backup-restore is a skill for Claude Code, Codex from alibaba/anolisa. It costs 155 tokens per session (1,872 once invoked), scanned C, original, Apache-2.0.

A backup and recovery guide for projects, personal files, operating systems, disks, and Alibaba Cloud snapshots on command-line Linux systems that use the yum package manager. It first identifies the environment and then selects the relevant backup level.

In plain words
What is it for?
Use it to plan or carry out backups, restores, snapshots, archives, rollbacks, clones, migrations, and disaster-recovery work for a workspace, user data, full system, or Alibaba Cloud disk.
Why use it?
It helps choose an appropriate recovery method without creating unnecessary duplicate backups, while accounting for tools such as LVM snapshots and Alibaba Cloud storage.

Skill for Claude CodeCodex

About the project

ANOLISA is a server-side operating layer for AI agent workloads that provides terminal access, token-saving tool-output compression, runtime controls, security, observability, skills, memory, and sandbox management. It is for running and supervising agents from a Linux terminal while retaining an existing shell, agent framework, and sandbox. The catalogue add-ons are components of its agent operating environment and workflows.

alibaba/anolisa · 618 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/alibaba/anolisa/backup-restore
Any agent
npx skills add alibaba/anolisa --skill backup-restore
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backup-restore

README.md
[![agentmods](https://agentmods.dev/badge/skills/alibaba/anolisa/backup-restore.svg)](https://agentmods.dev/skills/alibaba/anolisa/backup-restore)
Your own site
<a href="https://agentmods.dev/skills/alibaba/anolisa/backup-restore"><img src="https://agentmods.dev/badge/skills/alibaba/anolisa/backup-restore.svg" alt="Measured on agentmods" height="20"></a>
Per session 155 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,872 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00155 $0.01872
Opus 5 $0.00077 $0.00936
Sonnet 5 $0.00031 $0.00374
Haiku 4.5 $0.00015 $0.00187

Measured 5d ago against content hash 9811facace07, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

backup-restore scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Cloud metadata endpointhighServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

ECS_ID=$(curl -s --connect-timeout 2 http://100.100.100.200/latest/meta-data/instance-id 2>/dev/null)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

ECS_ID=$(curl -s --connect-timeout 2 http://100.100.100.200/latest/meta-data/instance-id 2>/dev/null)
src/os-skills/system-admin/backup-restore/SKILL.md · 171 lines

How it starts

The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.

备份与恢复技能

本技能处理四个层面的备份与恢复操作。执行前务必先探测环境、识别场景,再选择合适的层面。

适用环境:Linux / 纯命令行 / yum 包管理器


第零步:环境探测

在读取任何 reference 文件之前,先运行以下命令了解当前环境,据此推荐方案:

# 检测是否在阿里云 ECS 上
ECS_ID=$(curl -s --connect-timeout 2 http://100.100.100.200/latest/meta-data/instance-id 2>/dev/null)
if [ -n "$ECS_ID" ]; then
  echo "环境:阿里云 ECS(实例 $ECS_ID)"
else
  echo "环境:非 ECS 或无法访问元数据"
fi

# 操作系统信息
cat /etc/os-release | grep -E '^(NAME|VERSION)='

# 是否有 LVM
lvs 2>/dev/null && echo "LVM:可用" || echo "LVM:无"

# 磁盘空间与分区
df -h /
lsblk

根据探测结果:

  • 检测到 ECS → 优先推荐阿里云快照方案
  • 有 LVM → OS 备份可用 LVM 快照
  • 非 ECS 且无 LVM → 推荐 restic 或 tar

层面说明与包含关系

阿里云快照(云盘块级,平台管理)
└── 包含整个磁盘,含以下所有内容

操作系统备份(系统全量文件)
└── 包含以下所有内容

用户备份(家目录、dotfiles、个人数据)
└── 包含以下内容

工作区备份(项目文件、数据库)

高层面的备份天然包含低层面的数据。不要推荐冗余的备份组合——如果用户已经做了 OS 备份或阿里云快照,就不需要额外再做用户层或工作区层的备份。


层面选择

层面 管理主体 范围 常用工具
工作区 用户 项目文件、代码、数据库、工作目录 tarrsyncmysqldumpgit bundle
用户 用户 家目录(~)、dotfiles、应用数据、SSH 密钥 rsynctar
操作系统 用户/root 完整系统文件、磁盘镜像、系统状态 ddrestictar、LVM 快照
阿里云快照 阿里云平台 云盘块级快照,独立于 OS,可跨地域 aliyun-cli

场景识别与层面决策

在读取参考文件之前,先判断用户的真实场景,选择最合适的层面:

场景一:服务器迁移 / 整机备份 → 选阿里云快照(整机镜像)或 OS 备份,二选一即可 → ECS 环境优先推荐阿里云整机镜像,更可靠且恢复更快

场景二:系统崩溃防护 / 重大变更前保险 → 阿里云快照(最快,不影响系统运行)或 OS 备份

场景三:仅保护某个项目 / 数据库 → 工作区备份即可,不必做全量 OS 备份

场景四:换机器要带走个人配置(dotfiles/密钥) → 用户备份,轻量且目标明确

场景五:阿里云云盘快照 / 自动快照策略 → 阿里云快照层,需检测环境并获取用户授权


快速决策树

用户说"备份 X"
│
├── 迁移服务器 / 整机备份 / 系统级保护
│   ├── 是 ECS?→ references/aliyun-snapshot.md
│   └── 非 ECS?→ references/os.md
│   ※ 两者都已包含用户和工作区数据,无需叠加
│
├── X = 某个项目 / 文件夹 / 数据库 / 代码
│   └── → references/workspace.md
│
├── X = 家目录 / dotfiles / SSH 密钥 / 个人配置
│   └── → references/user.md
│
├── X = 整个系统 / 磁盘(非 ECS 或明确要求系统内备份)
│   └── → references/os.md
│
└── X = 云盘快照 / 阿里云快照 / ECS 平台级备份
    └── → references/aliyun-snapshot.md

Read the full file on GitHub · 171 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 171 lines · 155 tokens per session scan C 9811facace07

Subscribe to this mod's changes

backup-restore is a skill published in the GitHub repository alibaba/anolisa (618 stars, last pushed today), licensed Apache-2.0. It adds 155 tokens to every session and 1,872 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it C with 2 findings (cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

convex-domains

Point a domain you already own at your Convex app (DNS records, custom-domain attach, auth-origin rebind).

openclaw/clawhub · 29 tokens

convex-ship

Publish the current Convex app to a live .convex.app URL (deploy backend + upload web build).

openclaw/clawhub · 27 tokens

cross-platform-cloud-verification

Orchestrates cost-conscious cloud verification across available operating-system and architecture runners after cheaper checks pass. Use whenever a code change, bug fix, build, packaging flow, native dependency, UI behavior, filesystem behavior, or test has material cross-platform implications, even if the user only…

warpdotdev/warp · 92 tokens

performing-kubernetes-etcd-security-assessment

Assess the security posture of Kubernetes etcd clusters by evaluating encryption at rest, TLS configuration, access controls, backup encryption, and network isolation.

xalgorix/xalgorix · 38 tokens

beevibe-team-mesh-negotiation

Multi-round negotiation protocol — covers both initiator and peer roles. Use when about to call negotiate(), when receiving a intent block as a peer, or when receiving an 'escalated' sentinel from a blocked respondnegotiate. Covers proposal crafting, counter-strategy, deadlock detection, when to accept early…

beevibe-ai/beevibe · 112 tokens

beevibe-verify-pr

CI verification before marking a PR-bearing task done. Use BEFORE calling mcpbeevibeupdateprogress(done) on any session whose deliverable is a pull request — including the first dispatch (you opened the PR with gh pr create) and any revision dispatch (you pushed new commits to an existing PR). Watches the PR's…

beevibe-ai/beevibe · 172 tokens