Session Sync Cloud
Keep your agent's memory safe and synced across devices. Automatic encrypted backups to cloud storage (S3, Backblaze B2, or custom S3-compatible).
Why
You have precious conversation history, WAL entries, working buffer, and PARA notes. Losing them means context amnesia returns.
This skill automates backup:
- - Every 15 minutes while agent is running
- After every INLINECODE0
- Manual trigger available
Restore is one command away on a new device.
Features
- - Encrypted upload — AES-256; server never sees plaintext
- Versioned retention — Keep last 30 days of backups; prune automatically
- Cross-device — Install skill on another machine, run
sync_restore to pull latest - Dashboard — Open
memory/sync-dashboard.html to see backup history and storage usage - Low bandwidth — Only upload changed files (delta compression)
- Resume interrupted — Large files chunked; can resume
Prerequisites
- - Cloud storage bucket with S3-compatible API (AWS S3, Backblaze B2, MinIO, Wasabi)
- Access key + secret
- Bucket name
Configuration
Create session-sync-config.json in workspace root:
CODEBLOCK0
Encryption key: Generate with openssl rand -base64 32. Store this safely — you need it to restore.
Usage
Check status
CODEBLOCK1
Force backup now
CODEBLOCK2
Restore from backup
CODEBLOCK3
Or specific timestamp (from status output or dashboard):
CODEBLOCK4
How It Works
- 1. On trigger (timer or manual), scan
memory/ directory - Compute SHA256 of each file; compare with previous manifest
- Upload only changed files to cloud (multipart upload for large files)
- Save manifest JSON to cloud (lists files, hashes, timestamps)
- Prune old manifests beyond retention
- Log to INLINECODE6
Dashboard
Open memory/sync-dashboard.html in browser. It shows:
- - Last backup time
- Storage used (cloud)
- Number of versions retained
- Quick restore buttons (click to download latest manifest then restore)
Pricing
$9/month per agent. Includes:
- - Unlimited backup storage (up to 1GB; beyond that $0.02/GB-month)
- Unlimited restores
- Dashboard access
- Email support
FAQ
Q: Can I use any S3-compatible storage?
A: Yes. S3, Backblaze B2, MinIO, Wasabi, Cloudflare R2.
Q: Is end-to-end encryption mandatory?
A: Yes. All data encrypted before upload. Server only stores ciphertext.
Q: What if I lose the encryption key?
A: Unfortunately, cannot restore. Keep the key safe.
Q: How do I migrate to a new device?
A: Install the skill, configure with same cloud credentials and encryption key, then run sync_restore.
Q: Can I exclude certain files?
A: Not yet. Currently backs up entire memory/. Future version may add excludes.
Inspired by need for persistent-memory-as-a-service. Simple, reliable, affordable.
Session Sync Cloud
保护你的代理记忆安全,并在设备间同步。自动加密备份到云存储(S3、Backblaze B2 或自定义兼容 S3 的存储)。
为什么需要它
你拥有珍贵的对话历史、WAL 条目、工作缓冲区和 PARA 笔记。丢失它们意味着上下文遗忘症会卷土重来。
此技能可自动备份:
- - 代理运行时每 15 分钟一次
- 每次 /wrap_up 之后
- 支持手动触发
在新设备上只需一条命令即可恢复。
功能特性
- - 加密上传 — AES-256;服务器永远不会看到明文
- 版本保留 — 保留最近 30 天的备份;自动清理旧版本
- 跨设备 — 在另一台机器上安装此技能,运行 sync_restore 即可拉取最新备份
- 仪表盘 — 打开 memory/sync-dashboard.html 查看备份历史和使用情况
- 低带宽 — 仅上传已更改的文件(增量压缩)
- 断点续传 — 大文件分块处理;支持续传
前提条件
- - 具有兼容 S3 API 的云存储桶(AWS S3、Backblaze B2、MinIO、Wasabi)
- 访问密钥 + 密钥
- 存储桶名称
配置
在工作区根目录创建 session-sync-config.json:
json
{
provider: s3, // 或 backblaze、custom
endpoint: https://s3.amazonaws.com, // 为 B2/MinIO 覆盖此值
bucket: my-openclaw-backups,
keyid: YOURACCESS_KEY,
secretkey: YOURSECRET_KEY,
region: us-east-1, // 适用于 S3;B2 使用 us-west-002 等
path_prefix: openclaw/nero/, // 每个代理的前缀
interval_minutes: 15,
retention_days: 30,
encryptionkey: YOUR32BYTEKEY_BASE64 // 可选:如果未设置,则使用从凭据派生的密钥
}
加密密钥: 使用 openssl rand -base64 32 生成。请安全存储——你需要它来恢复数据。
使用方法
检查状态
bash
tool(session-sync-cloud, sync_status)
立即强制备份
bash
tool(session-sync-cloud, sync_now)
从备份恢复
bash
tool(session-sync-cloud, sync_restore, {timestamp: latest})
或指定时间戳(从状态输出或仪表盘获取):
bash
tool(session-sync-cloud, sync_restore, {timestamp: 2026-04-01T16:30:00Z})
工作原理
- 1. 触发时(定时器或手动),扫描 memory/ 目录
- 计算每个文件的 SHA256;与之前的清单进行比较
- 仅上传已更改的文件到云端(大文件使用分块上传)
- 将清单 JSON 保存到云端(列出文件、哈希值、时间戳)
- 清理超出保留期限的旧清单
- 记录到 memory/sync-log.jsonl
仪表盘
在浏览器中打开 memory/sync-dashboard.html。它显示:
- - 上次备份时间
- 已使用的存储空间(云端)
- 保留的版本数量
- 快速恢复按钮(点击下载最新清单,然后恢复)
定价
每个代理每月 $9。包括:
- - 无限备份存储(最多 1GB;超出部分 $0.02/GB-月)
- 无限恢复
- 仪表盘访问
- 电子邮件支持
常见问题
问:我可以使用任何兼容 S3 的存储吗?
答:可以。S3、Backblaze B2、MinIO、Wasabi、Cloudflare R2 均可。
问:端到端加密是强制性的吗?
答:是的。所有数据在上传前都已加密。服务器仅存储密文。
问:如果我丢失了加密密钥怎么办?
答:很遗憾,无法恢复。请妥善保管密钥。
问:如何迁移到新设备?
答:安装此技能,使用相同的云凭据和加密密钥进行配置,然后运行 sync_restore。
问:我可以排除某些文件吗?
答:目前还不行。当前备份整个 memory/ 目录。未来版本可能会添加排除功能。
灵感来源于对持久记忆即服务的需求。简单、可靠、实惠。