Claw Sync
Secure, versioned sync for OpenClaw memory and workspace.
Commands
/sync
Push your memory and skills to the remote repository.
CODEBLOCK0
/restore
Restore memory and skills from the remote repository.
CODEBLOCK1
/sync-status
Show sync configuration and local backup info.
CODEBLOCK2
/sync-list
List all available backup versions.
/sync-list
What Gets Synced
| File | Description |
|---|
| INLINECODE0 | Long-term memory |
| INLINECODE1 |
User profile |
|
SOUL.md | Agent persona |
|
IDENTITY.md | Agent identity |
|
TOOLS.md | Tool configs |
|
AGENTS.md | Workspace rules |
|
memory/*.md | Daily logs |
|
skills/* | Custom skills |
NOT Synced (security)
- -
openclaw.json - Contains API keys - INLINECODE9 - Contains secrets
Setup Required
Create ~/.openclaw/.backup.env:
CODEBLOCK4
Features
- - 🏷️ Versioned - Each sync creates a restorable version
- 💾 Disaster Recovery - Local backup before every restore
- 🔒 Secure - No config files synced, token sanitization
- 🖥️ Cross-platform - Windows, Mac, Linux
Claw 同步
为 OpenClaw 记忆与工作区提供安全、版本化的同步功能。
命令
/sync
将您的记忆和技能推送至远程仓库。
/sync → 推送并创建版本化备份
/sync --dry-run → 预览将要同步的内容
/restore
从远程仓库恢复记忆和技能。
/restore → 恢复最新版本
/restore latest → 同上
/restore backup-20260202-1430 → 恢复指定版本
/restore latest --force → 跳过确认
/sync-status
显示同步配置和本地备份信息。
/sync-status
/sync-list
列出所有可用的备份版本。
/sync-list
同步内容
用户档案 |
| SOUL.md | 智能体人格 |
| IDENTITY.md | 智能体身份 |
| TOOLS.md | 工具配置 |
| AGENTS.md | 工作区规则 |
| memory/*.md | 日常日志 |
| skills/* | 自定义技能 |
不同步内容(安全考虑)
- - openclaw.json - 包含 API 密钥
- .env - 包含机密信息
设置要求
创建 ~/.openclaw/.backup.env:
BACKUP_REPO=https://github.com/username/your-repo
BACKUPTOKEN=ghpyour_token
功能特性
- - 🏷️ 版本化 - 每次同步都会创建可恢复的版本
- 💾 灾难恢复 - 每次恢复前自动创建本地备份
- 🔒 安全可靠 - 不同步配置文件,令牌自动脱敏
- 🖥️ 跨平台 - 支持 Windows、Mac、Linux