← Back to Skills Marketplace
179
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install backup-restore
Description
系统备份恢复 - 全量备份、增量备份、自动备份计划、一键恢复、备份验证。保护配置、数据、技能和工作区。
README (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 调度器
- 验证备份完整性
- 定期测试恢复流程
- 备份到外部存储(可选)
Usage Guidance
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.
Capability Analysis
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).
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install backup-restore - After installation, invoke the skill by name or use
/backup-restore - Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Frequently Asked Questions
What is Backup Restore?
系统备份恢复 - 全量备份、增量备份、自动备份计划、一键恢复、备份验证。保护配置、数据、技能和工作区。 It is an AI Agent Skill for Claude Code / OpenClaw, with 179 downloads so far.
How do I install Backup Restore?
Run "/install backup-restore" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Backup Restore free?
Yes, Backup Restore is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Backup Restore support?
Backup Restore is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Backup Restore?
It is built and maintained by yuhui435 (@yuhui435); the current version is v1.0.1.
More Skills