Migration of matrix-synapse

I’m up to migrate my matrix-synapse server away from my freedombox.

I successfully got a copy of my matrix-server running with a docker-container on another machine by just copying the homeserver.db and the media directory form /var/lib/matrix-synapse as well as the homerserver.yaml (which of course needed a lot of adjustment) and all keys from /etc/matrix-synapse to the new instance.

The instance is up an running and interestingly the yet logged-in clients keep working. I also managed to register a new account.

But now the problem:
I cannot login again with the ldap-managed accounts despite using the right passwords. element and other clients report a mismatch of username and password.
I CAN indeed login with the newly registered account. Switching back to the old instance on my freedombox results in still working accounts.

It obviously has to do with ldap. I want to keep the users on the new instance but I don’t see a way to make them work on the new non-ldap instance.

Is there any idea how I could manage this or how to exports the accounts to a non-ldap environment?