Clawdbot Migration
Export and import complete Clawdbot installations.
Export
Create a portable archive of the current installation:
CODEBLOCK0
Options:
- -
--output, -o PATH — Output directory (default: current) - INLINECODE1 — Workspace path (default: ~/clawd)
- INLINECODE2 — Include session transcripts
- INLINECODE3 — Include credentials ⚠️ handle with care
Example:
CODEBLOCK1
Creates: INLINECODE4
Import
Restore from an export archive on a new machine:
CODEBLOCK2
Options:
- -
--workspace PATH — Target workspace (default: ~/clawd) - INLINECODE6 — Overwrite without prompting
Example:
CODEBLOCK3
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/, INLINECODE16
Migration Workflow
- 1. On old machine:
CODEBLOCK4
- 2. Transfer archive to new machine (scp, USB, cloud, etc.)
- 3. On new machine:
CODEBLOCK5
WhatsApp session transfers automatically — no re-scan needed.
Clawdbot 迁移
导出和导入完整的 Clawdbot 安装。
导出
创建当前安装的可移植归档文件:
bash
bash scripts/export.sh
选项:
- - --output, -o PATH — 输出目录(默认:当前目录)
- --workspace PATH — 工作区路径(默认:~/clawd)
- --include-sessions — 包含会话记录
- --include-credentials — 包含凭据 ⚠️ 请谨慎处理
示例:
bash
bash scripts/export.sh -o /tmp --include-sessions
创建文件:clawdbot-export-YYYYMMDD_HHMMSS.tar.gz
导入
在新机器上从导出归档文件恢复:
bash
bash scripts/import.sh
选项:
- - --workspace PATH — 目标工作区(默认:~/clawd)
- --force, -f — 覆盖而不提示
示例:
bash
bash scripts/import.sh clawdbot-export-20260129_120000.tar.gz --force
包含内容
| 组件 | 默认 | 标志 |
|---|
| 工作区 (~/clawd) | ✓ | — |
| 配置 (clawdbot.json) |
✓ | — |
| 托管技能 | ✓ | — |
| WhatsApp 会话 | ✓ | — |
| 会话记录 | ✗ | --include-sessions |
| 凭据 | ✗ | --include-credentials |
工作区排除项(可重新构建):
node_modules/, .next/, .open-next/, .vercel/, .wrangler/, .git/, dist/, build/
迁移工作流程
- 1. 在旧机器上:
bash
bash scripts/export.sh -o ~/Desktop
- 2. 将归档文件传输到新机器(scp、USB、云存储等)
- 3. 在新机器上:
bash
npm install -g clawdbot
bash scripts/import.sh ~/clawdbot-export-*.tar.gz
cd ~/clawd && clawdbot gateway start
WhatsApp 会话自动传输 — 无需重新扫描。