Migrating to another LDAP server

Sometimes it happens that we need to migrate the users from one LDAP server to another one. What's the best way to do this, without loosing access to your files, shares or any other metadata?

LDAP to Nextcloud mapping

Nextcloud uses internally always it's own UID. In order to communicate with the LDAP directory the DN is used, e.g. to send search queries. But the DN is not stable, for example moving a record in the LDAP tree will change the DN. In order to reliable find the right user record at the LDAP we need to store the UUID. This way we can identify the record, no matter where the user is located at the LDAP tree. The UUID of the LDAP record together with the mapping to the DN and the Nextcloud internal UID is stored in the ldap_user_mapping table.


Migrate to a new LDAP server

The best way to migrate the users to another LDAP server is to adjust the mapping of the LDAP UUID to the Nextcloud internal UI in the ldap_user_mapping table. First we need to connect Nextcloud to the new

Attached Files
There are no attachments for this article.

If you have any questions or feedback on this article, do not hesitate to contact us. We are here to help you get the most out of Nextcloud.