Hi,
I've been tracing this (using one backup of dev.moodle.org containing mnet users), and one of these messages should be displayed for backups containing mnet users in the last page before launching restore:
1) If the restore host is the SAME, this should be showed:
Note: This backup file contains remote Moodle Network user accounts which will be restored as part of the process.
2) I the the restore host is DIFFERENT:
Note: This backup file apparently originates from a different Moodle installation and contains remote Moodle Network user accounts that may fail to restore. This operation is unsupported. If you are certain that it was created on this Moodle installation, or you can ensure that all the needed Moodle Network Hosts are configured, you may want to still try the restore.'
But these notes are NEVER showed. I've found the original cause of this, with that info being called MNET_REMOTEUSERS on backup but being called MNET_EXTERNALUSERS on restore. So previous steps of restore don't detect that the file contains external users and fails.
Note that, no matter of this bug (that only affects to restore not displaying the message above), the restore process, effectively... will break if find one user whose mnet host isn't defined in the restore site. And that's current behaviour.
So, I'm going to:
1) Fix the MNET_REMOTEUSERS / MNET_EXTERNALUSERS bug in order to show the info properly before executing the restore. It's trivial to fix (and crazy that it wasn't detected before!)
And then... I think we have three alternatives:
a) Prevent completely restore to happen if backup contains mnet users and restore site is different from backup site. Easy to do, but blocks restore unless the moodle.xml is edited and that remote info is changed (can be done with a "simple shell script" anyway.
b) Allow to restore those users, and if no match with mnet hosts is found... convert them automatically to "manual" users (noticing about it in restore). Semi-easy to do but will decouple users completely from their original host. Perhaps only admins should be able to do this.
c) Pre-check all the mnet hosts existing in backup and compare them with mnet hosts existing in restore site. Abort restore and request admin to create those sites before continue. Complex (the pre-check involves to parse the xml file too early), but perhaps the more consistent solution.
So, apart of 1) that I'm going to fix now... what approach do you think is the best in a) b) c). Personally, thinking into privacy issues and consistency, I feel inclined to a) preventing restore completely and requesting to modify backup file. But I understand it isn't a 100% functional solution.
Please, comment about a-b-c (or other alternatives). Ciao 
Its urgent, there is no possibility to restore a mnet enabled server-course on a non mnet enabled server!