ZStack Cloud Platform
Single Server, Free Trial for One Year
In the previous issue, we initially introduced how to systematically perform migration and the quick usage of ZMigrate. However, users may also face massive, mission-critical, and heterogeneous database instance replication and migration in practice. Especially under the domestic IT innovation initiative, multiple domestic database vendors continuously deliver new solutions and products to clients. For customers, migrating directly from familiar systems like Oracle, PG, MySQL, and MSSQL to domestic databases such as Kingbase, DM, GaussDB, and OceanBase carries extremely high risks. To minimize risks, alleviate customer concerns, and serve as an effective supplement to whole-machine migration, we have launched a standalone database migration tool to help customers complete such heterogeneous migrations with minimal cost.
As CTO/CIO/ architect, we often face the following scenarios:
Especially in the current landscape where IT innovation vendors are proliferating like blooming flowers, system portability is destined to become a crucial element in designing future enterprise-level architectures, and is gradually emerging as standard knowledge among CTOs/architects. During migration processes, we typically categorize systems into the following two major classifications:
For stateless service migration, you can refer to the previous article Business Migration? Fear Not! ZStack ZMigrate Migration Software Best Practices.
For stateful cross-platform database migration, especially for distributed or strongly consistent databases relied upon by critical services, whole-machine migration solutions face significant challenges:
As the saying goes, “Experts excel in their specialized fields.” For complex stateful databases, ZStack provides a professional migration platform solution – DMS (Database Migration Service). DMS offers cross-platform, cross-version, cross-type full-incremental integrated real-time synchronization capabilities for dozens of mainstream databases.
When migrating databases, administrators select appropriate migration methods based on business requirements. The typical process for full-server migration is as follows:
Higher database write pressure leads to longer downtime (often 10-20 minutes or more), during which services remain inaccessible.
For scenarios requiring high business continuity, a pre-built new database can be deployed with DMS to handle replication, traffic redirection, and migration while ensuring uninterrupted database access. DMS integrates full and incremental synchronization: after completing full data transfer, it uses Log Ship technology (similar to database primary-secondary replication) to parse source database logs (e.g., MySQL Binlog, Oracle Redo, PostgreSQL WAL), convert them into DDL/DML statements, and execute them on the target database. This achieves near-zero-latency data replication (mimicking primary-secondary replication effects).
As shown in the figure below:
This approach easily redirects read traffic to the new database. Pre-launch production grayscale testing ensures the new database meets QPS capacity and RT requirements for switching. Service cutover only requires stopping legacy applications and redirecting data sources to the new database address (JDBC/ODBC URL), enabling seamless and transparent migration.
Similarly, DMS can handle migrations across various heterogeneous environments or databases, such as the following scenarios:
Beyond these scenarios, DMS addresses challenges in database cluster migrations—such as Oracle RAC, distributed GaussDB/OceanBase, SQL Server distributed clusters, or Raft-based three-node MySQL clusters. Traditional whole-machine migration approaches may fail to start target database clusters due to node sequence issues. In contrast, DMS leverages logical database replication to perfectly resolve node consistency problems in such cluster migration scenarios.
Compared with other database migration solutions, DMS requires smaller data volumes and achieves higher efficiency during migration. It eliminates the need to install any Agent, minimizes system intrusion, and avoids additional investigations into OS version compatibility or migration tool issues.
Taking Oracle migration as an example: Consider a 400GB Oracle database typically composed of – Data tablespace 50GB, Index tablespace 150GB, Online Redo 10GB, Archive Log 140GB, Temp tablespace 20GB, and Undo tablespace 30GB. DMS only needs to migrate the 50GB of data in the data tablespace to successfully launch the new database, making it particularly suitable for scenarios requiring rapid business testing and validation.
DMS can specify a particular database or table within the system for split, merge, or migration operations, offering finer migration granularity. For example:
We take the migration of a MySQL instance deployed on VMware to ZStack Cloud as an example.
Configure the source MySQL address (on VMware) and target MySQL (on ZStack).
Select the migration destination:
Choose the data source to migrate.
Among 4 databases under the source, select the trade database.
Enable CDC real-time replication.
Select tables for real-time migration and initiate replication.
Monitor migration progress, parallelism, and duration for large tables.
Check the timestamp of incremental replication. When the incremental Stream replication rate reaches 0, it indicates real-time consistency between source and target databases.