dbswitch: Offline Bulk Migration to Nearly 30 Databases, DDL Auto-Generated
Teams maintaining hand-written migration scripts get one open-source tool that covers mainstream engines, the Chinese domestic database lineup, and common big data stores in a single pipeline. The 120-second minimum sync interval rules out near-real-time use cases; the tool moves data in batches, and real-time replication demands other plumbing.
dbswitch is an offline batch migration tool from the dromara community, written in Java and released under BSD. It is built for two jobs: moving data between databases and loading data into warehouses or lakes. Structure migration converts field types, primary keys, and table creation statements into target DDL, and regex rules remap table or field names during the move.
Data sync reads source rows through JDBC in batches and writes them with insert or copy statements, supporting full, incremental, and CDC modes. Tables with primary keys get insert/update/delete delta sync from row comparison. Coverage spans nearly 30 databases: MySQL, Oracle, SQL Server, PostgreSQL, DB2, MariaDB, SQLite, and Sybase; the Chinese domestic engines DM, Kingbase8, HighGo, Oscar, GBase8a, OpenGauss, and OceanBase; and big data stores such as Hive, ClickHouse, StarRocks, Doris, Greenplum, MongoDB, and Elasticsearch.
Deployment is Docker-first, with h2, MySQL, PostgreSQL, or OpenGauss as the config store. The Vue2 UI covers connections, tasks, monitoring, scheduling, and audit logs; a config.yml path runs headless. The practical constraint: sync runs only on a schedule, with a tested minimum interval of 120 seconds. This is batch data movement, not near-real-time replication.
Incremental sync relies on row comparison for tables with primary keys rather than transaction logs, which fits the 120-second scheduling floor the author reports; near-real-time replication would need a different capture layer.
Domestic engines like DM, Kingbase8, HighGo, and GBase8a sit beside mainstream and big-data stores, so the compatibility list doubles as a map of China's data stack; the practical pitch targets shops mixing legacy engines with state-backed systems.
Positioned against DBSyncer, dbswitch wins on automatic table creation but loses on sync latency, which suggests migration tooling in this space is still chosen feature by feature rather than as a complete platform.
I've used Kingbase's kdts; there were failures migrating functions and views.