# Suspend Task

__*Using DM*__
__*DM Task Suspended*__

+ Example

```10
pause-task [-s "mysql-replica-01"] task-name

{
    "op": "Pause",
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "source": "mysql-replica-01",
            "worker": "worker1"
        }
    ]
}
```
-------------------------------------------------------------

`-s`: Pause a subtask from the data migration task on a specific MySQL source.

`task-name | task-file`: Specify the task name or task file path.

The differences between `pause-task` and `stop-task` are as follows:
- `pause-task` only suspends the execution of the migration task, retains the status information of the task in memory, etc., and can be queried by `query-status`. A new task with the same name can not be started.
- `stop-task` stops the execution of the migration task and removes the information related to the task in memory, and you can no longer use `query-status` queries. It does not remove data that has been written to the downstream database and `dm_meta` information such as checkpoints. A new task with the same name can be started again because the task no longer exists, and you are allowed to clean up the relay log.

A `pause-task` is typically used to temporarily pause a migration task to troubleshoot a problem, etc.; a `stop-task` is often used to permanently delete a migration task or to update configuration information in conjunction with a `start-task`.