By: Sakit Atakishiyev user 29 Jun 2018 at 1:51 a.m. CDT

3 Responses
Sakit Atakishiyev gravatar
Hi. I have Gluu server v3.0.1 and now I have installed new version v3.1.3 to different machine. I want to migrate my users from old machine to new. What is safe and simple way? How can I do this?

By Aliaksandr Samuseu staff 03 Jul 2018 at 6:07 p.m. CDT

Aliaksandr Samuseu gravatar
Hi, Sakit. 1. Dump your user entries from the old machine in LDIF format. Update all parts of DNs and attribute's values which are bound to some unique id of this specific instance with some stream text editor, like sed or awk. Then import them into the new server. **Or...** 2. At the old instance, make OpenLDAP listen on external interfaces. At the new instance configure Cache Refresh and point it to the old instance. Set mappings for all attributes you want to enter, and perhaps write a CR script to additionally update some attributes on the fly, if needed. The most difficult part will be migration of users' passwords, if you stored them on user entries in Gluu's internal LDAD db. As 3.0.1 used OpenLDAP which uses bcrypt for hashes by defaul, and 3.1.2+ use OpenDJ which doesn't support it. So hashes of passwords become of little use, even if you'll manage to import them into 3.1.3 instance. There is no solid solution for this issue, only [a workaround of sort](https://github.com/GluuFederation/oxAuth/issues/753). It's a custom script which allows such imported users to login by checking bcrypt hashes inside the script itself. So, at best, you may need to do some scripting, adapting this solution to your own needs (we can't support you here as a community user)

By Sakit Atakishiyev user 04 Jul 2018 at 1:58 a.m. CDT

Sakit Atakishiyev gravatar
Hi Aliaksandr. Thank you very much. I will do it.

By Aliaksandr Samuseu staff 04 Jul 2018 at 12:52 p.m. CDT

Aliaksandr Samuseu gravatar
You also have an option to use OpenLDAP even in recent packages, but I wouldn't recommend it as this kind of setups aren't tested that well as the ones based on OpenDJ. And you definitely must not use OpenLDAP if you are planning to build cluster, it has issues with replication atm.