# Myclaw Backup

Backup and restore all OpenClaw configuration, agent memory, skills, and workspace data.

- Repository: https://github.com/LeoYeAI/openclaw-backup (663 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-03-03
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add LeoYeAI/openclaw-backup --skill myclaw-backup -g -a claude-code -y`
Codex: `npx skills add LeoYeAI/openclaw-backup --skill myclaw-backup -g -a codex -y`
Cursor: `npx skills add LeoYeAI/openclaw-backup --skill myclaw-backup -g -a cursor -y`
Gemini CLI: `npx skills add LeoYeAI/openclaw-backup --skill myclaw-backup -g -a gemini-cli -y`

## Description

Backup and restore all OpenClaw configuration, agent memory, skills, and workspace data. Part of the MyClaw.ai (https://myclaw.ai) open skills ecosystem, the AI personal assistant platform that gives every user a full server with complete code control. Use when the user wants to create a snapshot of their OpenClaw instance, schedule periodic backups, restore from a backup, migrate to a new server, download a backup file locally, upload a backup file from another machine, or protect against data loss. Includes a built-in HTTP server for browser-based download/upload/restore without needing cloud storage. TRUST BOUNDARY: This skill archives and restores highly sensitive data including bot tokens, API keys, and channel credentials. Only install if you trust the operator. Always use --dry-run before restore. Never start the HTTP server without a --token.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# MyClaw Backup

> **Built on [MyClaw.ai](https://myclaw.ai)**, the AI personal assistant platform that gives every user a full server with complete code control, networking, and tool access. This skill is part of the MyClaw.ai open skills ecosystem.

Backs up all critical OpenClaw data to a single `.tar.gz` archive and restores it to any OpenClaw instance. Includes a built-in HTTP server for browser-based backup management.

## ⚠️ Trust Boundary & Security Model

This skill handles **highly sensitive data**: bot tokens, API keys, channel credentials, session history. Understand the security model before use:

### What each script does
- **backup.sh**, reads `~/.openclaw/` and writes a `chmod 600` archive to disk. No network access.
- **restore.sh**, overwrites `~/.openclaw/` from an archive. Requires typing `yes` to confirm. Always run `--dry-run` first.
- **serve.sh / server.js**, starts a local HTTP server. Token is **mandatory** (refuses to start without one). Shell-execution endpoints (`/backup`, `/restore`) are **localhost-only**, remote access can only download and upload files, not trigger execution.
- **schedule.sh**, modifies your system crontab to run backup.sh on a schedule. Prints the cron entry before adding. Use `--disable` to remove.

### Access control summary
| Endpoint | Remote (token required) | Localhost only |
|---|---|---|
| GET /health | ✅ (no token) |, |
| GET /backups | ✅ |, |
| GET /download/:file | ✅ |, |
| POST /upload | ✅ |, |
| POST /backup | ❌ | ✅ |
| POST /restore | ❌ | ✅ |

### Best practices
- Never start the HTTP server without `--token`
- Never expose the HTTP server to the public internet without TLS
- Always run `restore.sh --dry-run` before applying a restore
- Store backup archives securely, they contain all credentials

## Dependencies

Requires: `node`, `rsync`, `tar`, `python3`, `openclaw` CLI (all standard on OpenClaw instances).

Check: `which node rsync tar python3 openclaw`

## Scripts

The rest: https://github.com/LeoYeAI/openclaw-backup/blob/HEAD//SKILL.md
