Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Migrate retry

Security covered Maintenance fixes only 91 sites

This module automatically re-queues failed migration rows for re-processing. It's helpful when destination systems have temporary issues, allowing critical data to be migrated later. The number of retries is limited to prevent performance problems.

This module automatically re-queues the migrate failed rows so that they can be re-migrated. It is useful in case a row can not be migrated due to errors that can not be migrated from the migration side. For example: when the destination is a third party, and it has a temporary problem that won't be solved until some specific time, in that case, it is needed to re-migrate that item later.

The number of a row that is retried to migrate is limited to prevent bottlenecks. Currently, the maximum number of retries is 5.

Installation

After installing the module in an usual way, it is needed to add this line to the settings.php:

$settings['queue_service_migrate_retry'] = 'queue.migrate_retry';

Configuration

On the configuration page, check which migrations do you want to use the migrate_retry system.

How it works

To make the migrate items to be retried, it is needed to throw a MigrateException with the needs retry status (\Drupal\migrate_retry\MigrateIdMapInterface::STATUS_NEEDS_RETRY), when the items are failing. Only those rows having the source_row_status value as needs retry will be retried.

There is an example about how to throw the exception at the migrate destination used for tests.

After marking the row with that status, that row will be enqueued by the cron, and a queue worker will re-migrate the item.

It is also possible to enqueue items to retry using the queue manager service:

// Ids of a migrate row in which sourceid1 is 1 and sourceid2 is 34.
$source_ids = [1, 34]
$migration_id = 'my_custom_migration';
\Drupal::service('migrate_retry.queue_manager')->enqueueMigrateRow($migration_id, $source_ids);
Drupal 10–11

Ask your assistant about Migrate retry

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
2.1.0 Stable 10–11 Jul 24, 2026