← 返回
开发者工具 中文

Agent Migrate

Cross-platform agent migration and deployment. Use when: (1) migrating OpenClaw agent to new servers, (2) backing up and restoring agent state, (3) deploying...
跨平台代理迁移与部署。适用场景:(1) 将 OpenClaw 代理迁移到新服务器,(2) 备份并恢复代理状态,(3) 部署...
haha8d
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 697
下载
💾 10
安装
1
版本
#latest

概述

Agent Migration

Migrate OpenClaw agents across servers and platforms while preserving identity, memory, and configuration.

When to Use

USE this skill when:

  • Moving agent from local machine to remote server
  • Cloning agent configuration to multiple environments
  • Backing up complete agent state for disaster recovery
  • Syncing workspace changes between dev/prod
  • Upgrading OpenClaw with full rollback capability

DON'T use when:

  • Simple file copy operations → use cp/rsync directly
  • Database migrations → use database-specific tools
  • Non-OpenClaw application deployment

Core Concepts

Agent State Components

Agent State = Identity + Memory + Config + Skills + Extensions
├── workspace/           # Core identity files
│   ├── IDENTITY.md      # Who the agent is
│   ├── USER.md          # Who they serve
│   ├── SOUL.md          # Personality
│   ├── MEMORY.md        # Long-term memory
│   ├── AGENTS.md        # Operational rules
│   ├── TOOLS.md         # Environment notes
│   └── memory/          # Daily logs
├── .openclaw/
│   ├── openclaw.json    # Gateway config
│   ├── agents/          # Session data
│   └── extensions/      # Custom plugins
└── skills/              # Custom skills (if any)

Migration Workflows

1. Export (Source Machine)

# Full agent export
./scripts/export-agent.sh [export-name]

# Creates:
# /tmp/agent-export-[name]/
#   ├── manifest.json      # Export metadata
#   ├── workspace.tar.gz   # Core files
#   ├── config.tar.gz      # OpenClaw config
#   └── restore.sh         # Self-contained restore

2. Transfer

# Via SSH
scp -r /tmp/agent-export-[name] user@new-server:/tmp/

# Via GitHub (recommended for versioned deployments)
# Push to repo, clone on target

3. Import (Target Machine)

# Run self-contained restore
cd /tmp/agent-export-[name] && ./restore.sh

# Or manual:
./scripts/import-agent.sh /tmp/agent-export-[name]

Scripts

Export Agent

scripts/export-agent.sh [name] [--full]

Options:

  • name - Export identifier (default: timestamp)
  • --full - Include session history and logs

Import Agent

scripts/import-agent.sh <export-path> [--merge|--replace]

Options:

  • --merge - Merge with existing agent (default)
  • --replace - Wipe existing, clean install

Sync to GitHub

scripts/sync-github.sh <repo-url> [--push|--pull]

Syncs agent state to GitHub for versioned deployment.

Platform-Specific Notes

Linux → Linux

Direct transfer, no conversion needed.

macOS → Linux

  • Check for macOS-specific paths in scripts
  • Update file watchers if used

Windows WSL → Native Linux

  • Line endings auto-handled
  • Verify executable permissions

Docker Deployment

See references/docker-deploy.md for containerized deployment.

Security Checklist

  • [ ] Sanitize openclaw.json (remove sensitive tokens before export)
  • [ ] Verify target machine permissions
  • [ ] Rotate any exposed credentials post-migration
  • [ ] Test agent functionality before production cutover

Rollback

Exports are immutable snapshots. To rollback:

# Re-import previous export
./scripts/import-agent.sh /path/to/previous-export --replace

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 12:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,436
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,476
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,918