Install
openclaw skills install yuebao-self-backupBackup and restore OpenClaw agent configuration, skills, memory, and workspace files. Use when asked to "backup", "backup yourself", "create a restore point", "archive my agent", "export configuration", "save current state", or "setup auto-backup". Also handles restore: "restore from backup", "recover agent", "reinstall from backup".
openclaw skills install yuebao-self-backupBackup and restore your OpenClaw agent's complete state, including: configuration, skills, memory, and workspace files.
| Category | Path | Priority |
|---|---|---|
| OpenClaw config | ~/.openclaw/openclaw.json | ⭐⭐⭐ Required |
| API credentials | ~/.openclaw/.env | ⭐⭐⭐ Required |
| Skills | ~/.openclaw/workspace/skills/ | ⭐⭐⭐ Required |
| Memory files | ~/.openclaw/workspace/memory/ | ⭐⭐⭐ Required |
| Identity files | MEMORY.md SOUL.md IDENTITY.md USER.md | ⭐⭐⭐ Required |
| Config files | AGENTS.md TOOLS.md HEARTBEAT.md | ⭐⭐ Important |
| Cron jobs | ~/.openclaw/cron/jobs.json | ⭐⭐ Important |
| Credentials | ~/.openclaw/credentials/ | ⭐⭐ Important |
~/.openclaw/logs/ — logs, not needed~/.openclaw/media/ — media cache, too large~/.openclaw/workspace/.venv-*/ — Python envs, can be rebuilt~/.openclaw/completions/ — history cachepython3 ~/.openclaw/workspace/skills/self-backup/scripts/backup.py
Output: ~/backups/openclaw-backup-YYYY-MM-DD_HHMM.tar.gz
python3 ~/.openclaw/workspace/skills/self-backup/scripts/restore.py ~/backups/openclaw-backup-YYYY-MM-DD_HHMM.tar.gz
python3 ~/.openclaw/workspace/skills/self-backup/scripts/backup.py --list
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
Reinstall OpenClaw (fresh machine only)
npm install -g openclaw
Restore backup
python3 restore.py openclaw-backup-YYYY-MM-DD.tar.gz
Rebuild Python environment (not included in backup)
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
Re-login ClawHub
clawhub auth login --token <YOUR_TOKEN> --no-browser
Verify
openclaw status && openclaw doctor