有没有办法在不重新创建任务本身的情况下重新启动 DMS 中的复制任务?

问题描述

尝试使用 start_replication_task Boto3 方法重新启动 DMS 复制任务时遇到此错误

An error occurred (InvalidParameterCombinationException) when calling 
the StartReplicationTask operation: 
Start Type : START_REPLICATION,valid only for tasks running for the first time

为了解决我每次执行都创建一个新任务的问题,我可以用相同的任务重新启动它吗?

解决方法

如果您想从乞讨中重新启动任务,您可能需要将 StartReplicationTaskType 设置为 reload-target;如果您已经开始任务并且想要继续它,则可能需要设置 resume-processing

start-replication 仅在您创建任务并想要启动它后才有效

StartReplicationTaskType --> Valid Values: start-replication | resume-processing | reload-target

参考: https://docs.aws.amazon.com/dms/latest/APIReference/API_StartReplicationTask.html#DMS-StartReplicationTask-request-StartReplicationTaskType