← 返回
未分类 中文

OpenClaw Self Backup & Restore

Backup and restore OpenClaw agent configuration, skills, memory, and workspace files. Use when asked to "backup", "backup yourself", "create a restore point"...
备份和恢复 OpenClaw 代理的配置、技能、记忆和工作区文件。当被要求'备份'、'备份自己'、'创建还原点'时使用。
liuyue8135 liuyue8135 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 659
下载
💾 0
安装
1
版本
#latest

概述

Self Backup & Restore

Backup and restore your OpenClaw agent's complete state, including: configuration, skills, memory, and workspace files.

What Gets Backed Up

CategoryPathPriority
--------------------------
OpenClaw config~/.openclaw/openclaw.json⭐⭐⭐ Required
API credentials~/.openclaw/.env⭐⭐⭐ Required
Skills~/.openclaw/workspace/skills/⭐⭐⭐ Required
Memory files~/.openclaw/workspace/memory/⭐⭐⭐ Required
Identity filesMEMORY.md SOUL.md IDENTITY.md USER.md⭐⭐⭐ Required
Config filesAGENTS.md TOOLS.md HEARTBEAT.md⭐⭐ Important
Cron jobs~/.openclaw/cron/jobs.json⭐⭐ Important
Credentials~/.openclaw/credentials/⭐⭐ Important

What's NOT Backed Up

  • ~/.openclaw/logs/ — logs, not needed
  • ~/.openclaw/media/ — media cache, too large
  • ~/.openclaw/workspace/.venv-*/ — Python envs, can be rebuilt
  • ~/.openclaw/completions/ — history cache

Run Backup

python3 ~/.openclaw/workspace/skills/self-backup/scripts/backup.py

Output: ~/backups/openclaw-backup-YYYY-MM-DD_HHMM.tar.gz

Run Restore

python3 ~/.openclaw/workspace/skills/self-backup/scripts/restore.py ~/backups/openclaw-backup-YYYY-MM-DD_HHMM.tar.gz

List Backups

python3 ~/.openclaw/workspace/skills/self-backup/scripts/backup.py --list

Setup Weekly Auto-Backup (via OpenClaw cron)

openclaw cron add \
  --name "weekly-self-backup" \
  --cron "0 2 * * 0" \
  --tz "Asia/Shanghai" \
  --message "Run backup: python3 ~/.openclaw/workspace/skills/self-backup/scripts/backup.py and report result" \
  --session isolated \
  --announce \
  --channel telegram

After Restore: Rebuild Steps

  1. Reinstall OpenClaw (fresh machine only)

```bash

npm install -g openclaw

```

  1. Restore backup

```bash

python3 restore.py openclaw-backup-YYYY-MM-DD.tar.gz

```

  1. Rebuild Python environment (not included in backup)

```bash

cd ~/.openclaw/workspace

python3 -m venv .venv-stock

source .venv-stock/bin/activate

pip install yfinance pandas numpy pandas-ta ta ddgs tavily-python requests beautifulsoup4

```

  1. Re-login ClawHub

```bash

clawhub auth login --token --no-browser

```

  1. Verify

```bash

openclaw status && openclaw doctor

```

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-02 02:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,427 📥 326,940
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,250 📥 272,495
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 855 📥 336,293