- About DM
- What is DM?
- Basic Features
- Advanced Features
- Merge and Migrate Data from Sharded Tables
- Migrate from MySQL Databases that Use GH-ost/PT-osc
- Filter Certain Row Changes Using SQL Expressions
- DM Architecture
- Benchmarks
- Quick Start
- Deploy
- Maintain
- Tools
- Cluster Upgrade
- Manage Data Source
- Manage a Data Migration Task
- Manually Handle Sharding DDL Lock
- Manage Schemas of Tables to be Migrated
- Handle Alerts
- Daily Check
- Usage Scenarios
- Troubleshoot
- Performance Tuning
- Reference
- Secure
- FAQ
- Glossary
- Release Notes
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.
» 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.
config export [--dir directory]
Parameter explanation
dir
:- optional
- specifies the file path for exporting
- the default value is
./configs
Returned results
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.
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
config import -d /tmp/configs
start creating sources
start creating tasks
import configs from directory `/tmp/configs` succeed
Was this page helpful?