Is there a problem with just moving the mailboxes using the move mailbox command? How many mailboxes are in the database?
This link is a good reference for moving mailboxes between servers. To migrate servers, you might want to try copying over the mailbox store file and renaming it on the new server. It is a lot faster if you are working with a lot of mailboxes.