OpenClaw Migrator
Backup, restore, and migrate your entire OpenClaw setup between machines. One command to export, one command to restore.
Why
- Moving to a new Mac/server? Don't lose your agent's memory and personality.
- Want a hot standby? Clone your setup to a second machine.
- Disaster recovery? Restore from encrypted backup in minutes.
Commands
# Full export (creates encrypted .tar.gz.enc)
bash scripts/migrate.sh export
# Full export without encryption
bash scripts/migrate.sh export --no-encrypt
# Restore from backup
bash scripts/migrate.sh restore <backup-file>
# List what would be exported (dry run)
bash scripts/migrate.sh export --dry-run
# Export only specific components
bash scripts/migrate.sh export --only config,memory,skills
What Gets Exported
| Component | Path | Included |
|---|---|---|
| Global config | ~/.openclaw/openclaw.json | ✅ |
| Agent config | ~/.openclaw/agents/ | ✅ |
| Workspace files | ~/.openclaw/workspace/*.md | ✅ |
| Memory | ~/.openclaw/workspace/memory/ | ✅ |
| Knowledge | ~/.openclaw/workspace/knowledge/ | ✅ |
| Learnings | ~/.openclaw/workspace/.learnings/ | ✅ |
| Scripts | ~/.openclaw/workspace/scripts/ | ✅ |
| Skills (workspace) | ~/.openclaw/workspace/skills/ | ✅ |
| Cron jobs | via openclaw cron list --json | ✅ |
| Conversations | ~/.openclaw/workspace/memory/conversations/ | Optional |
What Gets Excluded
- Node modules, build artifacts
- Log files (regenerated)
- Session data (ephemeral)
- Gateway PID files
Restore Process
- Install OpenClaw on new machine
- Run
bash scripts/migrate.sh restore <backup-file> - Restart gateway:
openclaw gateway restart - Verify:
openclaw status
Security
- Exports are encrypted with AES-256-CBC by default
- Password prompted at export time (or via MIGRATE_PASSWORD env var)
- Auth profiles with API keys are included — handle backups securely
- Encrypted backups safe for cloud storage (S3, Google Drive, etc.)
Platform Support
- macOS ✅ (primary)
- Linux ✅
- Cross-platform migration (macOS → Linux, Linux → macOS) ✅