First of all, does the two organization have same entities? Dynamics CRM role mechanism has very complicated data structure. You not only migrate role data, but also migrate privilege data related to different entities. The good news is we still have solution
to achieve it. Firstly you should use Organization Service to get all of roles in the source organization, secondly you have to get all of privilege data using organization service, thirdly sync both roles and privilege data to destination organization,
finally map roles to users.
If my answer was help for you, please mark it as standard answer or vote it up.