Skip to content

When do I resume or restart my AWS DMS task that's in the Stopped or Failed status?

5 minute read
0

My AWS Database Migration Service (AWS DMS) task is in a Stopped or Failed state. I want to know when to resume or restart the task to continue replication.

Short description

When your AWS DMS task is in a Stopped or Failed status, you can resume or restart the task to continue replication.

When you resume a task, AWS DMS continues replication from the last point before the task stopped or failed.

When you restart a task, AWS DMS begins replication from the start and uses the table preparation mode that you chose when you created the task. For example, table preparation modes include Drop table on target, Truncate, and Do nothing. For more information, see Full-load task settings.

The behavior of the resume and restart actions varies based on which of the three AWS DMS migration methods that you're using. These methods include full load, full load and change data capture (CDC), and CDC only migration. For more information, see Creating a task.

The behavior of resume and restart depends on your migration method. AWS DMS supports full load, full load and change data capture (CDC), and CDC only migrations. For more information, see Creating a task.

Resolution

Resume or restart a full load task

If a full load task stops, then use the restart action in the AWS DMS console to reload all tables. AWS DMS uses the table preparation mode that you configured when you created the task

To reload only specific tables that failed during migration, use the reload table data option. AWS DMS reloads only the tables that didn't finish. Completed tables remain intact.

If you use a task that migrates multiple tables, then tables that didn't fully complete start over. Tables that completed migration aren't affected. If you're migrate a single table, then restart the task instead of the resume option.

Resume or restart a full load and CDC task

When you use a full load and CDC task, AWS DMS migrates table data and then applies data changes that occur on the source.

If you restart the task, this loads all the tables again, and captures source changes from the restart time.

If you configured the task with the Do nothing preparation mode, then manually empty target tables before restarting the task.

If you resume the task, then AWS DMS applies only the changes captured after the last stop point. If the migration task stops during the CDC phase, then AWS DMS saves the checkpoint information for future use. You can view the task checkpoint in the Overview details tab of the AWS DMS console.

Resume or restart a CDC only task

If you use a CDC only task, then you can start capturing source data changes from either the current time or from the CDC start point.

If you restart the task when a CDC start point is defined, then AWS DMS starts to capture and apply all changes from this point in time. If you restart a task without a CDC start point, then CDC changes from when the task was stopped until it was restarted are lost.

If you resume the task, then AWS DMS continues replication from the last stop point, regardless of the CDC start point configuration.

Note: If you restart a task with a Truncate target table preparation mode, then AWS DMS leaves existing target tables and their metadata in place. However, AWS DMS deletes all existing data from these tables before it restarts migration.

Restart your AWS DMS task

  • If the source database management system (DBMS) doesn't contain the recovery log files or transaction log files to resume the CDC process, then restart the task. AWS DMS reloads all table data and continues to capture changes.
  • If an AWS DMS task is in an Error status, then one or more of the tables in the task couldn't migrate. In an Error status, the task continues to load other tables from the selection rule. A task with a Failed status stops with fatal errors. After you resolve the errors, reload the tables or restart the task. For more information, see How do I troubleshoot and resolve table errors in AWS DMS?
  • If a full load and CDC or a CDC only task stops, then data changes spill over from memory to disk. Depending on the volume of change data swapped into disk, a task resume might take a long time to continue replication. This is because AWS DMS takes a longer time to read these changes from disk. If it's feasible, restart the task to avoid this wait time.
  • If you change between Oracle LogMiner and AWS DMS Binary Reader, then restart the CDC task. After you modify the CDC method, if you restart a CDC-only task that's configured with CDC recovery checkpoint, you might get the following error: "[SOURCE_CAPTURE ]D: Invalid context provided for the Binary Reader based CDC. Restart task is required."
  • To resolve the error, start the task based on a timestamp in the CDC start point.

Resume your AWS DMS task

  • If you move a task to a new replication instance, then resume the task to continue replication from the last stop point.
  • If you plan to upgrade your source or target databases, then stop AWS DMS tasks that run on these databases. Resume the tasks after your upgrades are complete.
    Note: Note: For aPostgreSQL engine version upgrade, you can't have any replication slots on the instance. Drop any replication slots before you upgrade your engine, and then restart the task to recreate the replication slot.

Related information

Sources for data migration

Working with an AWS DMS replication instance

Rebooting a replication instance

AWS OFFICIALUpdated 3 months ago