Full library migration tool - mxshift

YMatrix uses the mxshift tool to perform data migration operations.
The mxshift tool currently supports the following features:

  • Full migration: In units of database, implement data definition language (DDL) and data to the new YMatrix cluster for parallel migration of data tables from Greenplum 5 / Greenplum 6 / YMatrix cluster.
  • Reverse migration: Reverse migration from YMatrix to Greenplum 5 / Greenplum 6. Reverse migration of DDL is not currently supported.
  • Incremental migration: Incremental migration of data is achieved through the WHERE condition.
  • Supported data distribution strategies: hash distribution, random distribution, replication table (REPLICATED), Master-only.

1 mxshift principle

![](https://img.ymatrix.cn/ymatrix_home/mxshift full library migration (screenshot)_1693981579.png)

If the data migration process is likened by water flowing through the pipeline and the data transmission efficiency is likened by water flow rate, then the water flow rate is often limited to a low value as a whole because of the "narrowest part of the pipeline", resulting in the so-called "single-point bottleneck".
With this in mind, the mxshift tool implements data transfer from the Segment directly to the Segment, eliminating single point bottlenecks that may occur in common migration operations. When the topology of the source cluster and the target cluster are inconsistent, that is, heterogeneous, mxshift can also calculate the optimal mapping scheme based on the number of source cluster segments, the number of target cluster segments, whether the segment is on the same physical machine, etc., to realize automated data migration.

2 mxshift Usage

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

$ 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]
gphome="/opt/ymatrix/matrixdb5"

After you have prepared the TOML file, execute the following command to start mxshift for migration.

$ mxshift -c config_path.toml

Notes!
For the complete parameters and usage of mxshift, see mxshift.