Stop a Data Migration Task

You can use the stop-task command to stop a data migration task. For differences between stop-task and pause-task, refer to Pause a Data Migration Task.

  1. help stop-task
  1. stop a specified task
  2. Usage:
  3. dmctl stop-task [-s source ...] <task-name | task-file> [flags]
  4. Flags:
  5. -h, --help help for stop-task
  6. Global Flags:
  7. -s, --source strings MySQL Source ID

Usage example

  1. stop-task [-s "mysql-replica-01"] task-name

Flags description

  • -s: (Optional) Specifies the MySQL source where the subtasks of the migration task (that you want to stop) run. If it is set, only subtasks on the specified MySQL source are stopped.
  • task-name | task-file: (Required) Specifies the task name or task file path.

Returned results

  1. stop-task test
  1. {
  2. "op": "Stop",
  3. "result": true,
  4. "msg": "",
  5. "sources": [
  6. {
  7. "result": true,
  8. "msg": "",
  9. "source": "mysql-replica-01",
  10. "worker": "worker1"
  11. }
  12. ]
  13. }