RHDS9 Migration to RHDS11 Lab
Contents
Summary⌗
Migrate a Red Hat Directory server database from RHDS9 to RHDS11. There are no plugins or certificates and no replication has been set up.
The export and import of data is done using the ldif2db and db2ldif tools.
Nodes are built as VMs on a libvirt host with 2GB of memory, a 60GB drive and 2vCPUs.
Setup VMs⌗
Setup consists of a RHEL6 VM running Red Hat Directory Server 9 and a RHEL8.3 VM running Red Hat Directory Server 11. All of this will be setup using a libvirt host.
Hostname | IP Address | OS | RHDS |
---|---|---|---|
rhds9-single | 192.168.10.79 | RHEL 6.10 | RHDS 9 |
rhds11-single | 192.168.10.200 | RHEL 8.3 | RHDS 11 |
Create Lab Network⌗
This will create a bridge interface (virtbr389) in the subnet 192.168.10.0/24. Also this will resolve nodes with the FQDN <node>.rhds.lab
using libvirt’s dnsmasq.
And now define it in libvirt:
Create RHDS9 VM (RHEL 6.10)⌗
- Create the RHDS9 VM qcow image
- Resize the RHEL6 base image /dev/sda1 (/) into the newly created drive
- Setup up the image with things like root password and hostname.
- Create the VM. Remove
--dry-run
and--print-xml
in order to create the domain.
- Finally check the VM has started and confirm access is working.
Create RHDS11 VM (RHEL 8.3)⌗
- Create the VM disk for RHDS11
- Expand /dev/sda3 (/) from the RHEL 8.3 base image into the new VM image
- Setup the image with things like root password and hostname.
- Setup the VM. Remove
--dry-run
and--print-xml
in order to create the domain.
- Finally check the VM has started and confirm access is working.
Red Hat Directory Server Setup⌗
- Enable RHDS 9 repo, and install
redhat-ds
Setup RHDS 9⌗
- Update sysctl.conf and security limits and reboot the node
- Add the user and group for RHDS to run as
- Run
setup-ds-admin.pl
with the default options, setting the service to now run as user dirsrv and group dirsrv. Admin and Directory Manager have the password set toldapadmin
- At this point you should be able to login to the web admin interface with admin/ldapadmin on the server IP port 9830

Setup RHDS 11⌗
Enable the Red Hat Directory Server repo
Install RHDS and its dependencies.
- Use the interactive installer to configure RHDS, using the suffix
dc=rhds,dc=lab
and Directory Manager password as ldapadmin again.
Generate Test Data (RHDS9)⌗
389ds provides a tool to generate test data in an ldif format. Set the number of entries required before running.
- Once this has completed, use ldif2db to import the test data into RHDS.
Ensure the ldif file is readable by dirsrv (or the user running Directory Server. Also ensure selinux context is correct.
- Depending on how many entries are being added into Directory Server, it may be necessary to watch the the slapd log in order to see it complete
- When the import has completed, confirm that the entries are available via ldapsearch
- And select a random UID to help confirm the migration has gone OK.
Migration⌗
Here we will migrate the test data between RHDS9 and RHDS11, using a test data set of 100,000 entries generated with RHDS9.
Pre Migration on RHDS11⌗
- Enable older schemas
- Add following parameter to
/etc/sysconfig/dirsrt-rhds11-single
- Restart
dirsrv.target
Export Data from RHDS9⌗
- Export data from RHDS9 using the db2ldif tool
- Copy the exported ldif file
/tmp/userRoot.ldif
to the RHDS11 node.
Import into RHDS11⌗
Ensure exported ldif file can be read by
dirsrv
userInstall legacy tools for RHDS
- Get the name of the running instance
- Stop the Directory Server
- Import the ldif file using the ldif2db tool
- Ensure the import has completed successfully
- Once the import has completed, the Directory Server can be started again
- Finally check the data is accessible from RHDS11
This should match the data seen in Generate Test Data section
Epilogue⌗
The migration succeeded without many issues and the data was available, however this is a very simple set up in regards to the data and the RHDS9 being freshly installed. As a theory exercise it works, but caution is advisable if attempting to do this with live data. Fortunately the roll back is simple as no data has been removed or modified on the RHDS9 node. It’s also worth noting that a direct upgrade from <10 to 11 is not a supported option.
Useful Links⌗
Cleanup⌗
- Remove the VMs and their associated drives