by Colin Fraser.
Hi Ralf, yep I've run into this issue before, but I've always kept a vanilla Moodle ready to go, just in case. What I have done is to run a back up without User data. Restored that backup and dealt with screams from Teachers who needed their data, replacing it through individual course backups. I've cheated then and manually deleted Users who shouldn't be there in the old database, using phpMyAdmin. Not a really efficient way of doing it, but it worked for me. Time consuming, yes, but someone with a better understanding of SQL should be able to create a loop to delete unwanted users a lot faster than I ever could.