What it does
kynetra-migrate is a command-line tool with fourteen sources and three destinations. It is a one-time copy: it reads the source, writes records and prints a summary. SQLite, D1 and the KynetraDB NDJSON restore have the most test coverage. PostgreSQL, Supabase and the vendor API sources are reachable but lightly tested and have limits that are listed per source. MySQL and MariaDB are not supported.
How it works
Each source is a subcommand: sqlite, d1, pocketbase, postgres, supabase, firebase, algolia, pinecone, mongo, meilisearch, typesense, convex, appwrite and ndjson. The global options come before the subcommand. --to selects the destination, --limit caps the number of records written, --project-id writes into a tenant namespace, and --data-dir, --kdb-url and --kdb-key configure the engine and HTTP destinations. Each source turns rows or documents into entities and hashes the source id into a fixed ULID-format id where it can, so a second run produces the same ids.
--to stdout prints one JSON entity per line and changes nothing. --to engine --data-dir opens a local data directory through the engine library and locks it exclusively, so the server must be stopped. Writes are idempotent for unchanged data, and a record that exists with different content is refused and reported as failed. --to http posts attributes to a running server one record at a time. It does not send record ids or vectors, and it expects the target collections to exist already.
After each run the tool prints a summary line on standard error with the source, the counts read, written, skipped and failed, and the elapsed time. A non-zero failed count ends the run with an error, and rows already written are not rolled back. Several network sources stop early on a request error with a warning and a success exit, so compare the read count with the size of the source.
SQLite, D1, PocketBase, PostgreSQL and Supabase write records of kind coll:<table>, which the collection endpoints read once a collection with that name exists. The other sources write entities of a source-specific kind, for example mongo:<collection> or algolia:<index>, which are not collection records. The PostgreSQL source is the one that builds collection definitions, and the engine and stdout destinations do not create them.
--project-id writes into a tenant namespace. With --to engine the tool first checks that the target project exists and is active or paused. The server also has its own ingestion path for some of the same sources, which is described under data movement; this entry covers the standalone tool.
Where you reach it
- CLI
kynetra-migrate --to <stdout|engine|http> [--data-dir DIR] [--kdb-url URL --kdb-key KEY] [--project-id ID] [--limit N] <source> [source options] - CLI
Sources: sqlite, d1, pocketbase, postgres, supabase, firebase, algolia, pinecone, mongo, meilisearch, typesense, convex, appwrite, ndjson
Example
# Writes nothing: prints ten entities as JSON lines
kynetra-migrate --to stdout --limit 10 sqlite ./app.db
# Stop the server first: the data directory is opened exclusively
kynetra-migrate --to engine --data-dir ./data sqlite ./app.dbLimits
- A one-time copy. No source follows later changes. On the engine destination a second run adds new rows and refuses changed ones.
- Created and updated timestamps on the written records are the time of the run, except for NDJSON restores.
- The HTTP destination sends attributes alone, sends no ids or vectors, and needs the collections to exist first. The route it calls to create collections is not exposed by this server version, so create them with POST /v1/collections before the run.
- PostgreSQL and Supabase connections do not use TLS. Run the tool inside a private network or through an SSH tunnel.
- Several network sources end a run early on a request error with a warning and a success exit status, and Algolia stops at 10,000 records. The per-source limits are on the migration page.
- MySQL and MariaDB are not supported. The one MySQL feature in the engine writes from KynetraDB to a MySQL-compatible table.
- Tests exist for SQLite (16), D1 (3), PocketBase (1), NDJSON restore (26, plus 37 for the destinations), and a few helpers for the vendor sources. No test reads from a live PostgreSQL, Supabase, Firebase, Algolia, Pinecone, Mongo, Meilisearch, Typesense, Convex or Appwrite service.
Evidence
- On this siteMigration sources, with per-source limits
- On this siteData access integrations
- TestsCovered in the engine repository by 16 SQLite tests, 3 D1 tests, 26 NDJSON source tests, 37 destination tests and 12 PostgreSQL type-mapping tests. The vendor API sources have 1 or 2 helper tests each, and the PostgreSQL, Supabase, Firebase, Algolia and Pinecone row readers have none against a live system.
Test coverage is listed as present in the engine repository at this edition. This page does not report test results.
KynetraDB is in private preview
Request a preview to talk through the limits above against your own workload.