Skip to content

Latest commit

 

History

History
93 lines (67 loc) · 2.22 KB

dm-export-import-config.md

File metadata and controls

93 lines (67 loc) · 2.22 KB
title summary
Export and Import Data Sources and Task Configuration of Clusters
Learn how to export and import data sources and task configuration of clusters when you use DM.

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.

Note:

For clusters earlier than v2.0.5, you can use dmctl v2.0.5 or later to export and import the data source and task configuration files.

{{< copyable "" >}}

» help config
Commands to import/export config
Usage:
  dmctl config [command]
Available Commands:
  export      Export the configurations of sources and tasks.
  import      Import the configurations of sources and tasks.
Flags:
  -h, --help   help for config
Global Flags:
  -s, --source strings   MySQL Source ID.
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.

{{< copyable "" >}}

config export [--dir directory]

Parameter explanation

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

Returned results

{{< copyable "" >}}

config export -d /tmp/configs
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.

{{< copyable "" >}}

config import [--dir directory]

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

{{< copyable "" >}}

config import -d /tmp/configs
start creating sources
start creating tasks
import configs from directory `/tmp/configs` succeed