MogDB
Ecological Tools

mtk

Database Migration Toolkit

Synopsis

The MTK(Database Migration Toolkit) helps you migrate your database

mtk [flags]

Examples

# Generate configuration file
vi mtk_config.json

# Run
./mtk -c mtk_config.json

# Specify migration report
./mtk -c mtk_config.json --reportFile mtk_report.html

# Specify migration report and log and set debug
./mtk -c mtk_config.json --reportFile mtk_report.html --logfile mtk_report.log --debug

Options

      --batchSize int           Specify the batch size to be used for bulk/copy insert.
                                Valid values are  1-50000, default batch size is 1000
                                for mysql,oracle,openGauss,postgres.
      --bufferSize int          Specify the Batch Size in MB, to be used inserting or querying. 
                                Valid value is from 1 to 1024, default batch size is 8 MB
                                for postgres,openGauss,mysql.
      --caseSensitive int       Object case parameters in SQL statements.
                                 1 - lower case 
                                2 - upper case 
                                3 - Keep it the same as the source database.
  -c, --config string           Set mtk config file. Support json,yaml. [env MTK_CONFIG] (default "mtk.json")
      --cpBufferSize int        Specify the Batch Size in MB, to be used in the Copy Command. 
                                Valid value is from 1 to 1024, default batch size is 8 MB
                                for postgres,openGauss.
      --dataOnly                the only Migrate table data
  -d, --debug                   Set the debug mode.
                                Not necessary for the normal usage. [env MTK_DEBUG]
      --disableCollStatistics   disable Collect table statistics.
      --disableTableDataComp    disable table select count compare.
      --fetchSize int           Specify fetch size in terms of number of rows should be fetched in result set at a time.
                                Valid values are  1-50000, default batch size is 1000
                                for oracle. (default 1000)
  -h, --help                    help for mtk
      --httpAddr string         Set mtk run Http Service Address [env MTK_HTTP_ADDR]
      --logDir string           Set mtk run Http Service log dir [env MTK_LOG_DIR]
      --logfile string          Set mtk log file. Default value is reportFile dir.
  -p, --parallel int            Specify the parallelism. 
                                the degree of parallelism is now only useful when migrating table data and parallelism when creating an index. 
                                for oracle (default 4)
      --preCheck                preCheck for cloudArrow check
      --preRun                  preRun check.
  -r, --reportFile string       Set mtk report file or dir. If it is a file, use the file directory. 
                                Default value is current directory
                                report directory format reportYYYYMMDDHHMISS. report20210101121314
      --reportServer string     reportServer [env MTK_REPORT_SERVER]
      --schemaOnly              the only Migrate schema ddl
      --schemas string          the Migrate schema,Separated by commas.(schema1,schema2,db1)
      --tables string           the Migrate tables,Separated by commas.(tab1,schema1.tab1)
  -v, --version                 Set mtk report server api addr

SEE ALSO