Error Occurred During Data Migration Using DM

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 使用dm做数据迁移报错

| username: Jolyne

[TiDB Usage Environment] Production Environment / Testing / Poc
Testing
[TiDB Version]
v6.5.0
[Reproduction Path] What operations were performed to encounter the issue
[Encountered Issue: Phenomenon and Impact]
When using DM for data migration, checking the task file indicates a format issue. After searching for a long time and rewriting, the same error still occurs.


[Resource Configuration]
dm.yml (1.5 KB)
[Attachments: Screenshots/Logs/Monitoring]

| username: 麻烦是朋友 | Original post link

mysql-instances:
- source-id: “mysql-01” # Migrate data from the data source with source-id = mysql-replica-01
block-allow-list: “bw-rule-1” # Black and white list configuration name, use black-white-list if DM version is earlier than v2.0.0-beta.2
Configured twice. Here is an example for your reference:
name: “full_xxxxx_excxxxtabs” # Task name, must be globally unique
task-mode: “all” # Migration synchronization mode: full - full, incremental - incremental, all - full + incremental

target-database:
host: “xxx.xxx.xxx.xxx” # Downstream TiDB host IP
port: 5001 # TiDB access port
user: “root” # TiDB login user
password: “n7NLD6TpEuGe4kEnVhgxy0Dr67IMIXA=” # Login password encrypted using dmctl

routes: # Table routing rule set between upstream and downstream tables
route-rule-1:
schema-pattern: “xxxxx08”
target-schema: “xxxxx”

mysql-instances:

source-id: “mysql-root-xxx-xxxx-xxxxx”
mydumper-config-name: “global”
route-rules: [“route-rule-1”]
block-allow-list: “bw-rule-1”

block-allow-list: # Define filtering rules for migrating tables from data sources, multiple rules can be defined. Use black-white-list if DM version is earlier than v2.0.0-beta.2
bw-rule-1: # Rule name
do-dbs: [“xxxxx08”] # Databases to migrate, supports wildcards “*” and “?”, do-dbs and ignore-dbs
ignore-dbs: [“mysql”, “information_schema”, “performance_schema”, “sys”, “xxxxx_xxxx”, “xxxxx_xxxx”]
ignore-tables: # Tables to ignore
- db-name: “xxxxx08”
tbl-name: “xxxxxxxxxxx”
- db-name: “xxxxx08”
tbl-name: “xxxxxxxxxxx”
- db-name: “xxxxx08”
tbl-name: “xxxxxxxxxxx”

Global configuration for dump processing unit, referenced by instances through configuration item names.

mydumpers:
global:
extra-args: “”

| username: xingzhenxiang | Original post link

The image you provided is not accessible. Please provide the text you need translated.

| username: Hacker007 | Original post link

Generally, this kind of error is due to incorrect YAML format or the inclusion of non-existent keys. Check if the format is correct.

| username: Jolyne | Original post link

Wrote an extra mysql-instances.

| username: Jolyne | Original post link

Solved it. I mistakenly added an extra mysql-instance, which caused the conflict.