Last updated April 30, 2012. Created by mikeryan on April 30, 2012.
Log in to edit this page.

Migrate is a powerful module - it can make massive changes to the destination site very quickly - so it pays to think carefully about potential side-effects.

Mail

One very dangerous side-effect of creating users, nodes, and comments in bulk is generating emails in bulk. Do you have new user account notifications enabled? Is there a comment notification module enabled? Does your e-commerce solution automatically email users when orders are created? Think carefully before you run your first test migration. The Migrate module does what it can to help keep you out of trouble, at least on Drupal 7 - it substitutes a no-op mail class, MigrateMailIgnore, for any registered mail classes, so any Drupal component using the proper mail API to send email in node/user/etc. hooks will be silenced. However, some modules may bypass that API to use system mail() directly, and many will queue up mail to be sent via cron later - Migrate can't do anything about such situations, so it's up to you to be alert to the possibilities.

Ideally, migration code is developed and tested on a dedicated server, where you can be absolutely sure no emails can escape by disabling it at a system level. On many (most? all?) Linux-based servers, you can achieve this with:

<?php
sudo service sendmail stop
sudo chkconfig
--level 2345 sendmail off
?>

Resources

@todo: Talk about resource consumption - running out of disk space, effects on any other servers running on the same host, etc.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

By default Drupal sends users an activation email that can be turned off at Account Settings "Notify user when account is activated."

I tried importing users with status set to 1 which triggered this email, but fortunately I limited the run to 5 users only...

There are a bunch of options that can help block emails from being sent to real people: https://drupal.org/node/201981.

______________________________________________________________________________________________________
mybesinformatik.com - Drupal website development