| name | openclaw-sync |
| description | OpenClaw 数据轻量同步技能。基于 rclone + cron,支持 70+ 云存储后端,
定时备份 workspace 数据,资源占用极低。 |
🔄 OpenClaw 轻量同步
基于 rclone + cron 的数据备份方案,定时同步 workspace 到云端。
特点
- ✅ 轻量:无常驻进程,cron 定时触发
- ✅ 通用:支持 70+ 云存储(七牛/腾讯/阿里/百度/Google Drive...)
- ✅ 智能:无变化不传输,节省流量
- ✅ 简单:一条命令完成配置
快速开始
1. 安装 rclone
curl https://rclone.org/install.sh | sudo bash
sudo apt-get install rclone
2. 配置云存储
rclone config
3. 配置同步
cd skills/openclaw-sync
vim config/sync-config.json
{
"remote": "myqiniu",
"bucket": "mybucket",
"prefix": "openclaw-backup",
"interval": "5"
}
4. 启动同步
bash scripts/sync.sh
bash scripts/setup-cron.sh
目录结构
skills/openclaw-sync/
├── config/
│ ├── sync-config.json # 同步配置
│ └── sync-list.txt # 文件过滤规则
├── scripts/
│ ├── sync.sh # 同步脚本
│ ├── setup-cron.sh # 安装定时任务
│ └── status.sh # 查看状态
├── logs/
│ └── sync.log # 同步日志
└── SKILL.md # 本文件
配置文件
sync-config.json
{
"remote": "myqiniu",
"bucket": "mybucket",
"prefix": "openclaw-backup",
"interval": "5",
"syncDelete": false
}
sync-list.txt
# 包含规则(+开头)
+MEMORY.md
+memory/
+IDENTITY.md
+USER.md
+SOUL.md
+AGENTS.md
+TOOLS.md
+HEARTBEAT.md
+BOOTSTRAP.md
+README.md
+skills/
+tools/
# 排除规则(-开头)
-.git/**
-node_modules/**
-*.tmp
-*.log
-.DS_Store
常用命令
| 命令 | 说明 |
|---|
bash scripts/sync.sh | 手动执行同步 |
bash scripts/setup-cron.sh | 安装定时任务 |
bash scripts/remove-cron.sh | 移除定时任务 |
bash scripts/status.sh | 查看同步状态 |
tail -f logs/sync.log | 查看实时日志 |
支持的后端
- 七牛云 Kodo
- 腾讯云 COS
- 阿里云 OSS
- 百度云 BOS
- Google Drive
- Dropbox
- OneDrive
- WebDAV
- FTP/SFTP
- ...(共 70+)
配置方法:rclone config 交互式配置
故障排查
检查 rclone 配置
rclone listremotes
rclone ls myqiniu:mybucket
检查同步日志
tail -50 logs/sync.log
手动测试同步
bash scripts/sync.sh --dry-run
许可证
MIT License