360 Secure SkillHub
360 安全技能中心

Claw Migrate

提供 OpenClaw 工作区的纯指引式备份与恢复流程:用 tar 打包核心配置、记忆与技能目录,列明不应备份的敏感文件,并给出恢复、重新配对渠道、向平台分享与部署配置的步骤和排错建议。

hanxueyuan
hanxueyuan
热度 53.59
最近更新 2026-05-11 09:43:32
分类:自动化依赖:代码执行 / 读写文件应用场景:工作流 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add claw-migrate
Metadata
name
claw-migrate
description
OpenClaw workspace backup & restore - simple tar-based guide
homepage
https://github.com/hanxueyuan/claw-migrate
metadata
{"openclaw":{"emoji":"🔄","requires":{"bins":["tar"]}}}

claw-migrate - OpenClaw Backup & Restore Guide

Simple & Safe: No code, no automation, just clear instructions


🎯 What Is This?

claw-migrate is a pure guidance skill - no installation needed, no code to run.

Just follow the instructions below to backup and restore your OpenClaw workspace.


📁 Path 1: Backup

Quick Backup (Recommended)

# Backup core files only (fast)
tar -czf openclaw-backup-$(date +%Y%m%d_%H%M%S).tar.gz \
  -C /workspace/projects/workspace \
  AGENTS.md SOUL.md IDENTITY.md USER.md TOOLS.md HEARTBEAT.md \
  memory/ .learnings/ docs/ scripts/ templates/

Full Backup (Include Skills)

# Backup everything including skills
tar -czf openclaw-full-backup-$(date +%Y%m%d_%H%M%S).tar.gz \
  -C /workspace/projects/workspace \
  AGENTS.md SOUL.md IDENTITY.md USER.md TOOLS.md HEARTBEAT.md \
  memory/ .learnings/ docs/ scripts/ templates/ skills/ agents/

What to Backup ✅

Category Files Backup?
Core Config AGENTS.md, SOUL.md, IDENTITY.md, USER.md ✅ Yes
Tools TOOLS.md, HEARTBEAT.md ✅ Yes
Memory memory/*.md ✅ Yes
Learnings .learnings/*.md ✅ Yes
Docs docs/ ✅ Yes
Scripts scripts/ ✅ Yes
Templates templates/ ✅ Yes
Skills skills/ ⚠️ Optional (large)
Agents agents/ ⚠️ Optional

What NOT to Backup ❌

Files Reason
.env Contains API keys
openclaw.json Contains secrets
credentials/ Pairing tokens
identity/ Device auth
devices/ Paired devices
feishu/ Channel config
browser/ Browser data (large)

🔄 Path 2: Restore

Restore from Backup

# Extract backup to workspace
tar -xzf openclaw-backup-YYYYMMDD_HHMMSS.tar.gz \
  -C /workspace/projects/workspace/

Restore Steps

  1. Stop OpenClaw (if running)

    openclaw gateway stop
    
  2. Extract Backup

    tar -xzf your-backup.tar.gz -C /workspace/projects/workspace/
    
  3. Verify Files

    ls -la /workspace/projects/workspace/
    
  4. Re-pair Channels (required)

    openclaw pairing
    
  5. Restart OpenClaw

    openclaw gateway restart
    

Restore Notes ⚠️

Item Action
API Keys Re-add to .env
Channel Pairing Re-pair all channels
Device Auth Re-authenticate devices
Memory Files Merged automatically
Skills Preserved (no re-install needed)

📤 Path 3: Share to ClawTalent

Prepare for Sharing

  1. Sanitize Sensitive Info

    # Remove .env, credentials, etc.
    rm -rf .env credentials/ identity/ devices/
    
  2. Create Manifest

    {
      "name": "my-openclaw-config",
      "version": "1.0.0",
      "description": "My OpenClaw workspace config",
      "openclaw_version": "2026.3.13",
      "skills": ["coze-web-search", "agent-browser"],
      "agents": ["main", "life", "work"]
    }
    
  3. Upload to GitHub

    git add .
    git commit -m "Share OpenClaw config"
    git push origin main
    

Share via ClawTalent Platform

Visit: https://clawtalent.shop

  1. Create account
  2. Upload sanitized config
  3. Get CT-XXXX ID
  4. Share ID with others

🔍 Path 4: Discover Configs

Browse ClawTalent

Visit: https://clawtalent.shop

Search for:

  • Multi-agent setups
  • Specific skills
  • Industry templates

Deploy from ClawTalent

# Get config from CT-XXXX ID
git clone https://github.com/hanxueyuan/clawtalent-CT-XXXX.git
cd clawtalent-CT-XXXX
tar -xzf config.tar.gz -C /workspace/projects/workspace/

Verify Before Deploy

  1. Check OpenClaw version compatibility
  2. Review skills list
  3. Check agent configurations
  4. Verify no sensitive data included

🔐 Security Best Practices

Always ✅

  • Store backups in private GitHub repos
  • Use environment variables for API keys
  • Re-pair channels after restore
  • Sanitize before sharing

Never ❌

  • Share .env files
  • Commit API keys to Git
  • Share pairing tokens
  • Backup browser data (privacy)

📋 Quick Reference

Backup Commands

# Quick backup (core files only)
tar -czf backup.tar.gz -C /workspace/projects/workspace \
  AGENTS.md SOUL.md memory/ .learnings/

# Full backup (include skills)
tar -czf full-backup.tar.gz -C /workspace/projects/workspace \
  AGENTS.md SOUL.md memory/ .learnings/ skills/ agents/

Restore Commands

# Extract backup
tar -xzf backup.tar.gz -C /workspace/projects/workspace/

# Verify
ls -la /workspace/projects/workspace/

Storage Options

Option Command
Local cp backup.tar.gz ~/backups/
GitHub git push origin main
Cloud Upload to Google Drive / Dropbox

🆘 Troubleshooting

"Permission denied"

# Fix permissions
chmod -R 755 /workspace/projects/workspace/
chmod 600 /workspace/projects/workspace/.env

"Missing files after restore"

Check .gitignore - some files are excluded from backup by design.

"Channel not working after restore"

Re-pair channels:

openclaw pairing

"Skills not found"

Skills are in skills/ directory. Verify:

ls /workspace/projects/workspace/skills/

📚 Resources


📄 License

MIT License - Free to use and share (but sanitize first!)