← 返回 Skills 市场
179
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install backup-restore
功能描述
系统备份恢复 - 全量备份、增量备份、自动备份计划、一键恢复、备份验证。保护配置、数据、技能和工作区。
使用说明 (SKILL.md)
Backup & Restore - 系统备份恢复技能
核心功能
- ✅ 全量备份
- ✅ 增量备份
- ✅ 自动备份计划
- ✅ 一键恢复
- ✅ 备份验证
备份范围
| 类型 | 内容 | 路径 |
|---|---|---|
| 配置 | openclaw.json, cron/jobs.json, crons.json(兼容) 等 | ~/.openclaw/ |
| 数据 | memory/, workspace/ | ~/.openclaw/workspace/ |
| 技能 | skills/ | ~/.openclaw/workspace/skills/ |
| Agent | 所有 Agent 工作区 | ~/.openclaw/workspace-*/ |
使用方法
全量备份
python backup-restore.py full
增量备份
python backup-restore.py incremental
恢复备份
python backup-restore.py restore --backup \x3Cbackup_file>
验证备份
python backup-restore.py verify --backup \x3Cbackup_file>
自动备份计划
推荐配置(添加到 Cron):
{
"id": "daily-backup",
"name": "每日备份",
"schedule": "0 2 * * *",
"command": "python backup-restore.py incremental",
"agent": "main"
}
备份保留策略
- 每日备份:保留 7 天
- 每周备份:保留 4 周
- 每月备份:保留 12 个月
注意事项
- 备份前停止 Cron 调度器
- 验证备份完整性
- 定期测试恢复流程
- 备份到外部存储(可选)
安全使用建议
Do not treat this as a drop‑in backup tool yet. The main issues are: (1) the script hardcodes C:\Users\qq125\.openclaw instead of using the user's home directory (~ or Path.home()) — running it may create or act on an unexpected path; (2) the incremental/full behavior is simplified and may not capture all items the SKILL.md promises (skills/, other agent workspaces); (3) restore is currently a stub and will not actually restore files. Before installing or scheduling this: test in a safe environment, inspect/modify the script to use a configurable base_dir (argument or env var) or Path.home(), implement proper restore extraction, and confirm backup targets and exclusions (sensitive files, .git, large files). If you don't trust the author, request code changes or use a well‑maintained backup tool instead. If the hardcoded username is unexpected, treat that as a red flag until clarified.
功能分析
Type: OpenClaw Skill
Name: backup-restore
Version: 1.0.1
The skill bundle exhibits a significant discrepancy between its documentation and implementation. While SKILL.md claims to support generic paths (~/.openclaw/), the backup-restore.py script contains a hardcoded absolute path to a specific user's directory (C:\Users\qq125\.openclaw), which is a red flag for portability and potential environment-targeting. Furthermore, the 'restore' functionality is a non-functional stub, and the script targets different filenames (e.g., cron-check.json) than those listed in the documentation (e.g., cron/jobs.json).
能力评估
Purpose & Capability
SKILL.md describes backing up ~/.openclaw, workspace/, skills/, and multiple agent workspaces. The Python script instead uses a hardcoded base_dir = Path(r"C:\Users\qq125\.openclaw") and only zips a few items (openclaw.json, cron-check.json, workspace). It does not implement backing up skills/ or workspace-* locations as described. The hardcoded Windows path and specific username conflict with the documented (~) paths and cross‑platform expectations.
Instruction Scope
Documentation instructs full/incremental/verify/restore and recommends cron integration. The script: (1) implements full and incremental backups in a simplified way (incremental just zips two config files), (2) verify actually tests zip integrity, but (3) restore is a stub that only prints messages and does not extract or restore files. That contradicts the "一键恢复" (one‑click restore) claim. The script will create/operate under the hardcoded path rather than honoring ~ or other agent workspaces.
Install Mechanism
Instruction-only skill with a single Python script; no install spec or external downloads. Low installation risk from third‑party fetches.
Credentials
The skill does not request environment variables, credentials, or config paths in metadata. The script accesses only filesystem paths (but hardcoded). No explicit secrets requested.
Persistence & Privilege
always is false and the skill does not request persistent platform privileges. It does create a backups directory inside its hardcoded base_dir when run, but it does not modify other skills or global agent configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install backup-restore - 安装完成后,直接呼叫该 Skill 的名称或使用
/backup-restore触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Updated SKILL.md to clarify the backup range for configuration files, including support for cron/jobs.json and crons.json (compatibility).
- No changes to functionality; documentation improvement only.
v1.0.0
Initial release with comprehensive system backup and restore features:
- Supports full and incremental backups
- Enables automatic backup scheduling via cron
- Provides one-click restore and backup verification
- Protects key configurations, data, skills, and agent workspaces
- Includes recommended backup retention policies and best practice notes
元数据
常见问题
Backup Restore 是什么?
系统备份恢复 - 全量备份、增量备份、自动备份计划、一键恢复、备份验证。保护配置、数据、技能和工作区。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 179 次。
如何安装 Backup Restore?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install backup-restore」即可一键安装,无需额外配置。
Backup Restore 是免费的吗?
是的,Backup Restore 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Backup Restore 支持哪些平台?
Backup Restore 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Backup Restore?
由 yuhui435(@yuhui435)开发并维护,当前版本 v1.0.1。
推荐 Skills