Thanks! That’s very helpful. Looks like an old DB migration fails when the site setting value is an empty string. Here’s a fix:
https://github.com/discourse/discourse/pull/18296
You can update Discourse on your new server and retry the restore when that PR is merged.