I would like to see this request re-opened. Each academic year I create a new instance of Moodle. It would be useful to be able to export out roles via a tool. This type of tool would also help different institutions collaborate on managing Moodle since much of what gets happens in permissions. It would also be a useful tool for migrating to 2.0 since I can imagine many institutions might consider doing a fresh install.
Right now how I manage to import roles is:
1) Create an empty course in the old Moodle.
2) Backup the empty course making sure to bring over the Roles information.
3) Restore the course in the new version of Moodle making sure that I create new roles (rather than mapping to existing roles) for those roles that were edited in my old version of Moodle.
4) Delete the existing roles that I want to import into the new Moodle and rename the imported role. So for example, if I have edited the Teacher Role in the old Moodle, I would delete the teacher role in the new Moodle and rename the new imported role from Teacher_copy_1 to just Teacher.
5) Manually edit the student role by hand since you can not delete the student role from Moodle.
6) Double check that any new features that have been implemented (like a new activity or a new block) has the default permissions set rather than set to "Not Set" (presumably this is because the new permissions did not exist in the old system and so Moodle just defaults the stuff to "Not Set")
To be honest this is all a little to annoying to deal with. While yes it is better than doing it all by hand, I would much rather see a role importer/exporter to handle this type of thing.
I meant a "clone" function to duplicate an existing role.