Migrate OpenClaw agents across platforms and servers, preserving identity, memory, config, and skills for deployment, backup, syncing, and upgrades.
Migrate OpenClaw agents across servers and platforms while preserving identity, memory, and configuration.
✅ USE this skill when:
❌ DON'T use when:
cp/rsync directlyAgent 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)
# 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
# Via SSH
scp -r /tmp/agent-export-[name] user@new-server:/tmp/
# Via GitHub (recommended for versioned deployments)
# Push to repo, clone on target
# Run self-contained restore
cd /tmp/agent-export-[name] && ./restore.sh
# Or manual:
./scripts/import-agent.sh /tmp/agent-export-[name]
scripts/export-agent.sh [name] [--full]
Options:
name - Export identifier (default: timestamp)--full - Include session history and logsscripts/import-agent.sh <export-path> [--merge|--replace]
Options:
--merge - Merge with existing agent (default)--replace - Wipe existing, clean installscripts/sync-github.sh <repo-url> [--push|--pull]
Syncs agent state to GitHub for versioned deployment.
Direct transfer, no conversion needed.
See references/docker-deploy.md for containerized deployment.
openclaw.json (remove sensitive tokens before export)Exports are immutable snapshots. To rollback:
# Re-import previous export
./scripts/import-agent.sh /path/to/previous-export --replace
ZIP package — ready to use