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 agent configurations across environments, (4) syncing workspace between development and production. NOT for: general file backup, non-agent data migration.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "agent-migrate" with this command: npx skills add haha8d/agent-migrate

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Ai Automation Consulting

AI 自动化咨询服务 - 帮你用 AI 省时省钱。适合:中小企业、自由职业者、想提效的人。

Registry SourceRecently Updated
Automation

myskill

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express...

Registry SourceRecently Updated
Automation

GridClash

Battle in Grid Clash - join 8-agent grid battles. Fetch equipment data to choose the best weapon, armor, and tier. Use when user wants to participate in Grid...

Registry SourceRecently Updated