Skip to content

Engine conversions

Tested with: zb migrate 0.1 · Valkey 8.1 · MySQL 8.4 · libSQL 0.24 · FerretDB 2.4

Some engines share a wire protocol and a storage format, so a “conversion” is a migration with a different target engine. zb migrate --from inst_abc --to inst_def between two Databasezy instances is the fast path; from external sources, use --engine <target>.

FromToHowCaveats
Redis 7.2 or olderValkeyKey by key: SCAN, DUMP + PTTL, RESTORE ... REPLACE (RDB payloads, TTLs kept); .rdb uploads are loaded into a throw-away server and copied the same wayRedis 7.4+ payloads and module keys (JSON, Search) do not restore into Valkey; copy only
ValkeyRedisSame key-by-key copyRedis lacks Valkey 8 commands (HEXPIRE and friends)
MySQL 8.xMariaDB 11.xmysqldump (no GTID_PURGED, no column statistics) piped through a DDL rewrite: utf8mb4_0900_* to utf8mb4_uca1400_*, MySQL-8-only /*!80xxx */ clauses neutralised, DEFINERs strippedJSON becomes LONGTEXT with json_valid(); functional indexes fail; copy only
MariaDBMariaDB / MySQLmysqldump with MariaDB-safe flags (--loose-column-statistics=0, --loose-set-gtid-purged=OFF)MariaDB-only syntax (sequences, system-versioned tables) does not load into MySQL
SQLite filelibSQLsqlite3 .dump, then libSQL HTTP batchesCheckpoint the WAL before upload; virtual tables (FTS5, R*Tree) are recreated by hand
libSQLSQLite fileRead the tables out with a libSQL client; there is no one-step file export yet—
MongoDB (Atlas, self-hosted)FerretDBmongodump --archive | mongorestore --archiveTransactions, $text, GridFS, change streams; unsupported index options are reported
FerretDBMongoDBmongodump --archive | mongorestore --archive—
PostgreSQLTimescaleDBpg_dump -Fc | pg_restore between timescaledb_pre_restore() and timescaledb_post_restore(); tables stay regular tablesConvert large tables with create_hypertable(..., migrate_data => true) after the copy; see TimescaleDB
PostgreSQL / any SQLDuckDBExport tables to CSV (or a .duckdb file) and uploadAnalytical copy, not a live migration; see DuckDB

Per-engine details for every engine are under migrating by engine.

Minor and patch upgrades are automatic in the maintenance window, always preceded by a backup. Major upgrades are a migration between two instances so you can test first:

shell
zb instances create --engine postgres --engine-version 17 --size m2 --region us-east --name pg-prod-17
zb migrate --from pg-prod --to pg-prod-17 --mode copy_and_sync # logical replication across majors
zb migrate cutover mig_123

In-place major upgrades are planned for operator-backed engines. Until an engine has one, PATCH /v1/orgs/{org}/instances/{id} refuses that engine_version with the reason, and GET …/instances/{id}/options and the portal’s Settings → Version list which versions an instance can be upgraded to in place.