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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/24601/surreal-syncWhat This Skill Does
Surreal-Sync is a high-performance CLI-based migration and data synchronization engine designed specifically to bridge traditional and modern databases with SurrealDB. As part of the surreal-skills collection, this agent-ready tool handles both one-time bulk migrations and continuous, real-time data streaming through Change Data Capture (CDC) mechanisms. Whether you are moving from legacy relational stores like PostgreSQL and MySQL, document-oriented systems like MongoDB, graph-based Neo4j, or event-driven backends like Apache Kafka, Surreal-Sync provides a unified interface to map source data into SurrealDB's model. It automatically handles schema inference, transforms record IDs, and supports complex edge creation, making it indispensable for engineering teams transitioning to a multi-model database architecture.
Installation
To install this skill via the OpenClaw ecosystem, execute the following command in your terminal:
clawhub install openclaw/skills/skills/24601/surreal-sync
Alternatively, as this is a Rust-based tool, you can install the underlying CLI directly using Cargo:
cargo install surreal-sync
Use Cases
Surreal-Sync is designed for scenarios where data consistency and availability are critical. Primary use cases include:
- Legacy Modernization: Migrating monolithic PostgreSQL or MySQL databases to a modern SurrealDB instance without downtime using trigger-based or wal2json CDC.
- Event-Driven Integration: Keeping SurrealDB updated with real-time events flowing through Apache Kafka.
- Multi-Source Aggregation: Consolidating fragmented data from disparate sources like JSONL logs and document-store databases into a unified SurrealDB graph structure.
- Disaster Recovery/Sync: Maintaining an active secondary database instance that stays in sync with your production primary database.
Example Prompts
- "OpenClaw, initiate a full synchronization from my local PostgreSQL database at 'postgresql://user:pass@localhost/mydb' to the 'production' namespace and 'main' database in SurrealDB."
- "Set up an incremental CDC listener for my MongoDB instance running at 'mongodb://localhost:27017' and target the 'events' table in my SurrealDB cloud instance."
- "Run a batch import of all records found in 'user_data.jsonl' into the 'users' table of my local SurrealDB server."
Tips & Limitations
- Resumability: Always leverage the checkpoint tracking features to ensure that in the event of a network failure, the sync process can resume exactly where it left off rather than re-importing millions of records.
- Performance Tuning: Adjust batch sizes during the initial full sync phase to prevent overloading your source database.
- Limitations: While JSONL import is supported, it is a static process and does not support ongoing CDC. Ensure your source database has proper permissions for CDC (e.g., replica set permissions for MongoDB or wal2json plugin installed for Postgres) before initiating a stream.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-24601-surreal-sync": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-read, external-api
Related Skills
deep-research
Async deep research via Gemini Interactions API (no Gemini CLI dependency). RAG-ground queries on local files (--context), preview costs (--dry-run), structured JSON output, adaptive polling. Universal skill for 30+ AI agents including Claude Code, Amp, Codex, and Gemini CLI.
surrealfs
SurrealFS virtual filesystem for AI agents. Rust core + Python agent (Pydantic AI). Persistent file operations backed by SurrealDB. Part of the surreal-skills collection.
surrealdb
Expert SurrealDB 3 architect and developer skill. SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospatial), schema design, security, deployment, performance tuning, SDK integration (JS, Python, Go, Rust), Surrealism WASM extensions, and the wider ecosystem (Surrealist, Surreal-Sync, SurrealFS, SurrealKit). Universal skill for 30+ AI agents.
surrealism
SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.