360 Secure SkillHub
360 安全技能中心

Migrate

通过 scripts/export.sh 与 scripts/import.sh,把当前 Clawdbot 安装(工作区 ~/clawd、clawdbot.json 配置、托管技能、WhatsApp 会话,可选会话记录与凭据)打包为 tar.gz 归档,并可在新机器上导入恢复。

mrgoodb
mrgoodb
热度 91.62
最近更新 2026-05-17 11:09:47
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add migrate
Metadata
name
migrate
description
Export and import Clawdbot installations for migration between machines. Use when the user wants to migrate Clawdbot to a new computer, backup their setup, or restore from a backup. Handles workspace files, config, WhatsApp sessions, and optionally credentials.

Clawdbot Migration

Export and import complete Clawdbot installations.

Export

Create a portable archive of the current installation:

bash scripts/export.sh

Options:

  • --output, -o PATH — Output directory (default: current)
  • --workspace PATH — Workspace path (default: ~/clawd)
  • --include-sessions — Include session transcripts
  • --include-credentials — Include credentials ⚠️ handle with care

Example:

bash scripts/export.sh -o /tmp --include-sessions

Creates: clawdbot-export-YYYYMMDD_HHMMSS.tar.gz

Import

Restore from an export archive on a new machine:

bash scripts/import.sh <archive.tar.gz>

Options:

  • --workspace PATH — Target workspace (default: ~/clawd)
  • --force, -f — Overwrite without prompting

Example:

bash scripts/import.sh clawdbot-export-20260129_120000.tar.gz --force

What's Included

Component Default Flag
Workspace (~/clawd) ✓ —
Config (clawdbot.json) ✓ —
Managed skills ✓ —
WhatsApp session ✓ —
Session transcripts ✗ --include-sessions
Credentials ✗ --include-credentials

Excluded from workspace (can be rebuilt): node_modules/, .next/, .open-next/, .vercel/, .wrangler/, .git/, dist/, build/

Migration Workflow

  1. On old machine:

    bash scripts/export.sh -o ~/Desktop
    
  2. Transfer archive to new machine (scp, USB, cloud, etc.)

  3. On new machine:

    npm install -g clawdbot
    bash scripts/import.sh ~/clawdbot-export-*.tar.gz
    cd ~/clawd && clawdbot gateway start
    

WhatsApp session transfers automatically — no re-scan needed.