by Lawrence Ng.
Which version of Moodle are you running?
There was a bug that user roles and enrolments were not successfully restored if the enrolments were using database enrolment. Only restored if they were manual or self enrolled
We experienced that ourselves so i wrote an external script to change them to manual instead for those enrolled via db method