Migrate SmarterMail to a Different Server (Using Robocopy)

This article applies to recent versions of SmarterMail. View articles for SmarterMail 15.x and earlier.
When moving a SmarterMail installation from one server to another it is best to minimize the downtime. When a SmarterMail install has many Gigabytes or more of data it can take a long time to copy from one server to another, causing an increase in downtime.

To help minimize the downtime and speed up the migration process, Robocopy can be used to copy the data over a few days before the move, then use it again to ONLY copy the changed data. Doing the bulk of the migration ahead of time, then simply copying over just the changed/unretrieved data means that final step in the migration process is much smaller and will minimize the downtime.

IMPORTANT NOTES: 
  • SmarterMail data should be migrated to a new server that's running the same build number. Do not follow these steps to migrate a SmarterMail 16.x or prior installation to a new server running the current 100.0.xxxx build. If you wish to upgrade along with your migration, you must migrate to the server then perform the upgrade, or perform the upgrade on the old server then migrate. 
  • During the final phase of your copy (the final move), it is critical that your SmarterMail service on both servers is stopped.
  • Robocopy is capable of locking files, so if you include the Spool directory (this could occur if, for example, you choose to copy all of C:\Smartermail), ensure service is STOPPED before running robocopy as well. 
To migrate SmarterMail to a different server using Robocopy, follow the command below:
C:\>Robocopy [source] [destination] /MIR /ZB /R:1 /W:3

This will mirror the data, will retry once, then wait 3 seconds before attempting a retry if there is any connection issue. If applicable, ensure you copy over your Certificate data in addition to your Domain data (examples below). 

If you are doing the migration in a multi-phase operation, using the below commands (adjusted for your pathing) will bring over all the Domain and Certificate data you need before the final cutover. For the final cutover, repeat the Domain folder Robocopy command with the service stopped.

C:\>Robocopy C:\SmarterMail\Domains \\SmarterMail_New\SmarterMail\Domains /MIR /ZB /R:1 /W:3
C:\>Robocopy C:\SmarterMail\Certificates \\SmarterMail_New\SmarterMail\Certificates /MIR /ZB /R:1 /W:3
NOTE: When using the /MIR command this will overwrite any data in the destination folder that does not match the source folder.

For more commands on Robocopy, please refer to Microsoft documentation.

Learn more about SmarterMail's enterprise email features and benefits.

Feedback

What would be the command to only copy the newly added data?
Richard Frank (11/17/2014 at 2:47 AM)
Add /XO to the end of your command to eXclude Older files.

(Just in case someone comes across this post later and wants to know)

Eric Van Pyrz (5/26/2015 at 12:36 PM)