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"...
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 83 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description say 'backup & restore OpenClaw agent state' and the scripts explicitly read and archive OpenClaw configuration, skills, memory, identity files and credential directories — all coherent with the stated purpose.
Instruction Scope
Instructions direct running the included Python scripts and optionally scheduling via OpenClaw cron. The scripts read many sensitive files (e.g., ~/.openclaw/.env, ~/.openclaw/credentials/) and create a local archive in ~/backups; this is expected for a full backup but is sensitive by design. The SKILL.md suggests using cron with '--announce --channel telegram', which could broadcast backup results depending on the cron system — the skill scripts themselves do not perform network calls or externally transmit archived data.
Install Mechanism
No install spec; skill is instruction-plus-scripts. The scripts are Python and run locally; nothing is downloaded from arbitrary URLs or installed automatically by the skill. Low installation risk.
Credentials
The skill requests no environment variables, which is consistent. However it explicitly includes API credential files and credential directories in backups, so it will aggregate secrets into local archives. This is proportionate for a backup tool but increases risk if backup storage is not protected or if cron/announce features broadcast status to external channels.
Persistence & Privilege
always is false and the skill does not request persistent elevated privileges or modify other skills. It operates on user files under the home directory and creates backups under ~/backups; no indication of modifying system-wide configs or other skills.
Assessment
This skill appears to do what it says: create and restore local backups of OpenClaw configuration, skills, memory and credential files. Before using it, consider the following: (1) Backups include sensitive data (e.g., ~/.openclaw/.env and credentials/) — store backups with strong filesystem permissions and/or encrypt them (e.g., gpg, age, encrypted archive). (2) If you enable automated cron/announce, verify what the OpenClaw cron 'announce' and channel behavior sends — avoid broadcasting secrets or full manifest to external channels. (3) Do a test restore on a disposable environment to confirm the restore flow and file ownerships/permissions. (4) Keep the backups directory (~/backups) on a secure volume; if you store backups off-host (cloud), use client-side encryption. (5) Avoid running restore as root; run as the same user to preserve expected paths. If you want stronger guarantees, ask the author for an option to encrypt backups or to exclude credential files by default.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.1
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Self Backup & Restore
Backup and restore your OpenClaw agent's complete state, including: configuration, skills, memory, and workspace files.
What Gets Backed Up
| 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 |
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
-
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
Files
3 totalSelect a file
Select a file to preview.
Comments
Loading comments…
