Full-Database Migration Tool – mxshift

YMatrix uses the mxshift tool to perform full-database data migration.

Currently, mxshift supports the following features:

  • Full migration: Migrates both data definition language (DDL) and data of tables in parallel from a Greenplum 4.3.X/5/6 or YMatrix cluster to a new YMatrix cluster, at the database level.
  • Incremental migration: Migrates DDL and data of newly added tables from a Greenplum 5/6 or YMatrix cluster to a new YMatrix cluster, at the table level.
  • Conditional migration: Enables conditional data migration using the WHERE clause.
  • Supported data distribution strategies: Hash distribution, random distribution, replicated tables (REPLICATED), and Master-only tables.

1 How mxshift Works

If we compare the data migration process to water flowing through a pipe, and data transfer speed to the flow rate, then the overall rate is often limited by the narrowest part of the pipe—this creates a "bottleneck".

To address this, mxshift enables direct Segment-to-Segment data transfer, eliminating potential single-point bottlenecks common in traditional migration methods. When source and target clusters have different topologies (i.e., heterogeneous environments), mxshift automatically calculates the optimal mapping strategy based on factors such as the number of Segments in the source and target clusters, and whether Segments reside on the same physical host, enabling seamless automated migration.

2 Using mxshift

mxshift runs using a configuration file. First, edit the configuration file config.toml.

Note!
For the complete configuration file, see mxshift.

$ vim config.toml

[database]
    [database.source]
        db-database= "testdb"
        db-host="sdw3"
        db-password="xxxx"
        db-port=54322
        db-user="mxadmin"

    [database.target]
        db-database="destdb"
        db-host="172.16.100.32"
        db-password="yyyy"
        db-port=5432
        db-user="mxadmin"

[scope]
install-dir="/usr/local/greenplum-db-6.7.1"

After preparing the TOML file, run the following command to start the migration with mxshift:

$ mxshift -c config_path.toml

Note!
For a complete list of mxshift parameters and usage, see mxshift.