Logo di Myclaw Backup

Myclaw Backup

Community
LeoYeAI
myclaw-backup

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.

Panoramica

Pubblicato daLeoYeAI
Repositoryopenclaw-backup
Nome della skillmyclaw-backup
Stelle
659
Fork
117
File inclusi
15
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 15

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da LeoYeAI su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Myclaw Backup in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/LeoYeAI/openclaw-backup/tree/main
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LeoYeAI/openclaw-backup.git \
  .claude/skills/myclaw-backup
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Myclaw Backup in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Myclaw Backup non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Myclaw Backup non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

MyClaw Backup

Built on 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

EndpointRemote (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

ScriptPurpose
scripts/backup.sh [output-dir]Create backup (default: /tmp/openclaw-backups/)
scripts/restore.sh <archive> [--dry-run] [--overwrite-gateway-token]Restore — always dry-run first
scripts/serve.sh start --token TOKEN [--port 7373]Start HTTP server — token required
scripts/serve.sh stop|statusStop/check server
scripts/schedule.sh [--interval daily|weekly|hourly]System cron scheduling

Gateway token behavior (v1.6+): By default, restore.sh preserves the new server's gateway.auth.token after restoring openclaw.json. This prevents the "gateway token mismatch" error in Control UI / Dashboard after migration. Use --overwrite-gateway-token only for full disaster recovery on the same server.

What Gets Backed Up

See references/what-gets-saved.md for full details.

Includes: workspace (MEMORY.md, skills, agent files), openclaw.json (bot tokens + API keys), credentials, channel pairing state, agent config + session history, devices, identity, cron jobs, guardian scripts.

Excludes: logs, binary media, node_modules, canvas system files.

Common Workflows

Create backup

bash
bash scripts/backup.sh /tmp/openclaw-backups
# → /tmp/openclaw-backups/openclaw-backup_TIMESTAMP.tar.gz (chmod 600)

Restore — always dry-run first

bash
# Step 1: preview what will change
bash scripts/restore.sh openclaw-backup_TIMESTAMP.tar.gz --dry-run

# Step 2: review the output, then apply
bash scripts/restore.sh openclaw-backup_TIMESTAMP.tar.gz

The restore script saves a pre-restore snapshot before overwriting anything.

HTTP server — token is mandatory

bash
# Token is required — server refuses to start without one
bash scripts/serve.sh start --token $(openssl rand -hex 16) --port 7373
# → http://localhost:7373/?token=<generated-token>

Never share the URL on a public network without a reverse proxy + TLS.

The Web UI provides: create backup, download .tar.gz, upload, dry-run preview, restore.

HTTP API (all require token except /health):

  • GET /health — Health check (unauthenticated, read-only)
  • GET /backups — List backups
  • POST /backup — Create backup
  • GET /download/:filename — Download archive
  • POST /upload — Upload archive (multipart, field: backup)
  • POST /restore/:filename — Restore; add ?dry_run=1 to preview

Migrate to a new instance

Old machine:

bash
bash scripts/serve.sh start --token MYTOKEN --port 7373

New machine (after installing OpenClaw):

bash
# Download
curl -O "http://OLD_IP:7373/download/openclaw-backup_TIMESTAMP.tar.gz?token=MYTOKEN"

# Always dry-run first
bash scripts/restore.sh openclaw-backup_TIMESTAMP.tar.gz --dry-run

# Apply
bash scripts/restore.sh openclaw-backup_TIMESTAMP.tar.gz
# All channels reconnect automatically — no re-pairing needed

Schedule daily auto-backup (OpenClaw cron)

json
{
  "name": "daily-openclaw-backup",
  "schedule": { "kind": "cron", "expr": "0 3 * * *", "tz": "UTC" },
  "payload": {
    "kind": "agentTurn",
    "message": "Run a backup using the myclaw-backup skill. Output dir: /tmp/openclaw-backups",
    "timeoutSeconds": 120
  },
  "sessionTarget": "isolated"
}

Post-Restore: Automatic Recovery Report

After restore.sh completes, it writes workspace/.restore-complete.json. On the next heartbeat/startup, the Agent should:

  1. Check if workspace/.restore-complete.json exists
  2. If yes: read it, send a restore report to the user, then delete the file (one-shot — never report twice)
  3. Send the report in the user's primary language (read from workspace/USER.md)

Report format (adapt language from USER.md)

✅ [Restore complete — in user's language]

📦 Backup: {backup_name}
🤖 Agent: {agent_name}
🕐 Restored at: {restored_at}
💾 Contents restored: workspace, config, credentials, history, cron...

[Channel reconnect instructions in user's language]

Future: MyClaw Cloud Backup

The HTTP API is designed to be compatible with a future MyClaw cloud backup service. When available, replace the local server URL with the MyClaw API endpoint — the upload/download/restore flow stays identical.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Myclaw Backup?

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...

Perché usare Myclaw Backup su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Myclaw Backup è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Myclaw Backup in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/LeoYeAI/openclaw-backup/tree/main. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Myclaw Backup?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Myclaw Backup?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Myclaw Backup: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Myclaw Backup è gratuita?

Sì. È pubblicata su GitHub da LeoYeAI con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇