MogDB
Ecological Tools

MTK Usage

  • Check the version.

    ./mtk -v
  • Apply the license.

    ./mtk license gen
  • Check the command line help.

    ./mtk -h

Migration( After 2.1.0)

  • init project

    ./mtk init-project -n ora2og
    # will build a migration directory
    ora2og
    ├── config
    │   └── mtk.json
    ├── data
    ├── report
    └── schema
  • edit the configuration file

    vi ora2og/config.mtk.json
    # Edit connection information and migration objects (tables/schemas).
    # The directory definition does not need to be modified
  • run

    ./mtk -c ora2og/config/mtk.json
    # debug
    ./mtk -c ora2og/config/mtk.json --debug
    # only Schema is migrated
    ./mtk -c ora2og/config/mtk.json --schemaOnly
    # Only Data is migrated
    ./mtk -c ora2og/config/mtk.json --dataOnly
  • view Report

View the report in the ora2og/report directory

  • export as a file

    ./mtk -c ora2og/config/mtk.json --file
    # Only Schema is migrated
    ./mtk -c ora2og/config/mtk.json --file --schemaOnly
    # Only Data is migrated
    ./mtk -c ora2og/config/mtk.json --file --dataOnly
  • The command line specifies the migration object

    # specify the table
    ./mtk -c ora2og/config/mtk.json --tables schema1.table1,schema2.table2
    # specify the schema
    ./mtk -c ora2og/config/mtk.json --schemas schema1,schema2

Migration( before 2.1.0)

  • edit the configuration file.
vi mtk_config.json
  • run the configuration file.
./mtk -c mtk_config.json
  • specify the migration report and log file, and set the debug mode.
./mtk -c mtk_config.json --reportFile mtk_report --logfile mtk_report.log--debug
Parameter Description
-c, --config Specifies the configuration file path. The default path is mtk.json.
-d, --debug Enables the debug mode.
-l, --logfile string Specifies the log file. By default, the log is printed to the terminal window.
-r, --reportFile Specifies the mig report.

Edit the configuration file in advance. For details, see Configuration File.

See Command