by Matthew Willis.
Can't edit the above, so posting here.
Step 4 above is incorrect. We're appending 'duplicate' to the username and email, AND setting mnethostid = 1 WHERE mnethostid = 0
E.g. query:
Step 4 above is incorrect. We're appending 'duplicate' to the username and email, AND setting mnethostid = 1 WHERE mnethostid = 0
E.g. query:
update mdl_user
set username = concat(username, '.duplicate'),
email = concat(email, '.duplicate'),
mnethostid = 1
where mnethostid = 0
Running this query allows the backups to progress further - until the next user it hits this constraint on, or the backup is successfully restored.