Agent State Backup
Auto-backs up core files (IDENTITY, SOUL, MEMORY, knowledge base) daily via cron, creates compressed .tgz archive, enables one-click restore in new environme...
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 50 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
OpenClaw
Suspicious
high confidencePurpose & Capability
The described purpose (backup/restore of OpenClaw state files) is coherent with the files and paths referenced (~/.openclaw/*). However the skill promises runnable scripts (agent-backup.sh, agent-restore.sh, setup-backup-cron.sh) and a "one-click restore" experience while the package is instruction-only and contains no code or install spec — the claimed capabilities are not actually provided.
Instruction Scope
SKILL.md instructs the agent/user to run scripts that would read/write/overwrite sensitive local files, set up cron jobs, and delete old backups (e.g., using xargs rm). Those actions are within the stated backup scope, but the instructions assume the presence of scripts that don't exist here and include deletion commands that can be dangerous if run in the wrong directory or without verification.
Install Mechanism
There is no install spec and no code files (instruction-only). That lowers risk of arbitrary code being installed, but it also means the skill is incomplete: it documents scripts and dependencies (bash, tar, gzip) but does not provide them or an installation mechanism to create them.
Credentials
The skill requests no environment variables or credentials, which is proportionate. However the backups themselves contain highly sensitive state (IDENTITY, SOUL, MEMORY, USER.md, knowledge) — the SKILL.md does not mention encryption or secure storage/transfer, which is important for proportional handling of sensitive data.
Persistence & Privilege
The skill does not request always:true and uses normal autonomous invocation defaults. There is no evidence it modifies other skills or system-wide configs. If the agent were allowed to run the described scripts autonomously, it could access and overwrite sensitive files — but the package does not include those scripts.
What to consider before installing
This skill's documentation describes convenient backup/restore scripts and cron setup, but the package contains only instructions (no scripts or installer). Before installing or following the steps: 1) Do not copy/run commands that assume scripts exist — obtain the actual scripts from a trusted source or implement them yourself. 2) Review any backup/restore scripts you run to ensure deletion commands (xargs rm) use the correct paths and safeguards to avoid accidental deletions. 3) Treat backups as highly sensitive: encrypt them, restrict filesystem permissions, and use secure transfer methods when migrating to another machine. 4) If you expect an automated "one‑click" restore, confirm the skill actually supplies the needed scripts or an installer; otherwise this package is incomplete. 5) Prefer testing restore on a disposable environment before overwriting production data.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Agent State Backup & Restore
自动备份 OpenClaw 核心状态文件,防止上下文丢失。
📦 备份内容
IDENTITY.md- 身份定义SOUL.md- 人格定义MEMORY.md- 长期记忆memory/*.md- 每日记忆USER.md- 用户信息knowledge/**/*- 知识库
🚀 快速使用
手动备份
~/.openclaw/workspace/scripts/agent-backup.sh
手动恢复
~/.openclaw/workspace/scripts/agent-restore.sh
设置自动备份 (每日凌晨 2 点)
~/.openclaw/workspace/scripts/setup-backup-cron.sh
📁 文件位置
- 备份脚本:
~/.openclaw/workspace/scripts/agent-backup.sh - 恢复脚本:
~/.openclaw/workspace/scripts/agent-restore.sh - 备份目录:
~/.openclaw/backups/ - 保留策略: 最近 7 个备份
🔧 配置选项
编辑 ~/.openclaw/workspace/scripts/agent-backup.sh:
# 修改保留天数 (默认 7 天)
ls -t agent_backup_*.tgz | tail -n +8 | xargs -r rm
# 改为保留 30 天:tail -n +31
# 修改备份目录
BACKUP_DIR="$HOME/.openclaw/backups"
📊 备份日志
查看备份历史:
cat ~/.openclaw/backups/backup.log
⚠️ 注意事项
- 首次备份前 - 确保所有重要文件已保存
- 恢复操作 - 会覆盖当前文件,建议先备份当前状态
- 磁盘空间 - 每个备份约 20-50KB,7 个备份约 350KB
- Cron 权限 - 确保 cron 有权限访问工作目录
🔄 迁移到新环境
- 在新环境安装 OpenClaw
- 复制备份文件
.tgz到新机器 - 运行
agent-restore.sh - 重启 OpenClaw
版本: 1.0.0
最后更新: 2026-03-03
依赖: bash, tar, gzip
Files
1 totalSelect a file
Select a file to preview.
Comments
Loading comments…
