闲社服务运行正常AI智能体自动化平台
s

超现实同步

技能标识:surreal-sync

Data migration and synchronization to SurrealDB from MongoDB, PostgreSQL, MySQL, Neo4j, Kafka, and JSONL. Full and incremental CDC sync. Part of the surreal-skills collection.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.2.1
检测标记
后台标记通过
免费
免费获取
2
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

超现实同步

Surreal-Sync —— 数据迁移与同步

Surreal-Sync 是一款命令行工具,用于将数据从多种数据库源迁移至 SurrealDB,支持通过变更数据捕获(CDC)实现全量同步与增量同步。

支持的源

源全量同步增量CDC方法
MongoDB是是变更流
MySQL
是 | 是 | 基于触发器的CDC + 序列检查点 | | PostgreSQL(触发器) | 是 | 是 | 基于触发器的CDC + 序列检查点 | | PostgreSQL(wal2json) | 是 | 是 | 基于wal2json插件的逻辑复制 | | Neo4j | 是 | 是 | 基于时间戳的追踪 | | JSONL文件 | 是 | 不适用 | 从JSON Lines批量导入 | | Apache Kafka | 是 | 是 | 带去重的消费者订阅 |

快速开始

bash

安装 surreal-sync(Rust 二进制文件)


cargo install surreal-sync

从 PostgreSQL 全量同步(基于触发器)

surreal-sync from postgres trigger-full \ --connection-string postgresql://user:pass@localhost/mydb \ --surreal-endpoint http://localhost:8000 \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

从 PostgreSQL 增量CDC(wal2json)

surreal-sync from postgres wal2json \ --connection-string postgresql://user:pass@localhost/mydb \ --surreal-endpoint http://localhost:8000 \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

从 MongoDB 全量同步

surreal-sync from mongo full \ --connection-string mongodb://localhost:27017/mydb \ --surreal-endpoint http://localhost:8000 \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

从 JSONL 批量导入

surreal-sync from jsonl import \ --file data.jsonl \ --surreal-endpoint http://localhost:8000 \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

从 Kafka 消费

surreal-sync from kafka consume \ --bootstrap-servers localhost:9092 \ --topic my-events \ --surreal-endpoint http://localhost:8000 \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

CLI 模式

surreal-sync from <源> <命令> \
--connection-string [连接字符串] \
--surreal-endpoint [SURREAL 端点] \
--surreal-username [SURREAL 用户名] \
--surreal-password [SURREAL 密码] \
--to-namespace <命名空间> \
--to-database <数据库>

主要特性

  • - 自动模式推断与 SurrealDB 表创建
  • 基于源主键的记录ID映射
  • 关系提取与图边创建
  • 可配置的批量大小与并行度
  • 带检查点追踪的可恢复同步
  • Kafka 消费者的去重功能

完整文档

请参阅主技能的规则文件以获取完整指导:

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 surreal-sync-1776321928 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 surreal-sync-1776321928 技能

通过命令行安装

skillhub install surreal-sync-1776321928

下载

⬇ 下载 surreal-sync v1.2.1(免费)

文件大小: 1.88 KB | 发布时间: 2026-4-16 17:12

v1.2.1 最新 2026-4-16 17:12
surreal-sync v1.2.1

- No code or documentation changes detected in this release.
- Version bump only; functionality remains the same as previous version.
返回顶部