How can I migrate from Discourse Hosted to self-hosting

I’ve done it a bunch of times.

You need to upgrade your server to solve that migration error. There was a bug that causes that migration error but it was fixed a few days ago. Both sites that we having that error have now successfully restored. (one self hosted, one migrating to discourse.org hosting)