Export and Import Data Sources and Task Configuration of Clusters

config command is used to export and import data sources and task configuration of clusters.

Export and Import Data Sources and Task Configurations of Clusters - 图1

Note

For clusters earlier than v2.0.5, you can use dmctl (>= v2.0.5 and < v8.0.0) to export and import the data source and task configuration files.

  1. » help config
  2. Commands to import/export config
  3. Usage:
  4. dmctl config [command]
  5. Available Commands:
  6. export Export the configurations of sources and tasks.
  7. import Import the configurations of sources and tasks.
  8. Flags:
  9. -h, --help help for config
  10. Global Flags:
  11. -s, --source strings MySQL Source ID.
  12. Use "dmctl config [command] --help" for more information about a command.

Export the data source and task configuration of clusters

You can use export command to export the data source and task configuration of clusters to specified files.

  1. config export [--dir directory]

Parameter explanation

  • dir:
    • optional
    • specifies the file path for exporting
    • the default value is ./configs

Returned results

  1. config export -d /tmp/configs
  1. export configs to directory `/tmp/configs` succeed

import the data source and task configuration of clusters

You can use import command to import the data source and task configuration of clusters from specified files.

  1. config import [--dir directory]

Export and Import Data Sources and Task Configurations of Clusters - 图2

Note

For clusters later than v2.0.2, currently, it is not supported to automatically import the configuration related to relay worker. You can use start-relay command to manually start relay log.

Parameter explanation

  • dir:
    • optional
    • specifies the file path for importing
    • the default value is ./configs

Returned results

  1. config import -d /tmp/configs
  1. start creating sources
  2. start creating tasks
  3. import configs from directory `/tmp/configs` succeed