Show Table of Contents
5.3. Database Migration Methods
Important
Make sure to always perform the pre-migration tasks as described in Section 5.2, “Pre-migration Tasks” before the database migration.
5.3.1. The Export and Import Migration Method
The export and import migration method is the process of exporting a back-end database to an LDIF file. You will then import the LDIF file on the new server. You must perform this task for each back end defined in the Directory Server instance.
The example below shows two back ends being exported and imported from and to a single Directory Server instance.
Example 5.1. Exporting and importing two back ends from and to a single instance
- On the previous Directory Server version, use the
db2ldifutility by running the following commands:#
/usr/lib64/dirsrv/slapd-instance_name/db2ldif -n userroot -a /tmp/userroot.ldif#
/usr/lib64/dirsrv/slapd-instance_name/db2ldif -n backend2 -a /tmp/backend2.ldif - On the new server instance, use the
ldif2dbutility by running the following commands:#
/usr/lib64/dirsrv/slapd-instance_name/ldif2db -n userroot -i /tmp/userroot.ldif#
/usr/lib64/dirsrv/slapd-instance_name/ldif2db -n backend2 -i /tmp/backend2.ldif
5.3.2. The Replication Migration Method
Note
If using the replication migration method, custom schema does not need to be manually added to the new Directory Server, replication will replicate any custom schema to the new instance.
This migration method uses replication to migrate the database to the new Directory Server instance. A benefit to this approach is that you can keep the previous server up and running while the migration process is being performed.
Once all the migration tasks are performed, you can then put the new Directory Server instance into production and decommission the previous server.
5.3.2.1. Using Replication
These steps show how to use replication to migrate your existing database to the new Directory Server instance.
Procedure 5.1. Using replication
- Enable replication on the new Directory Server instance.For detailed information on enabling replication, see the Red Hat Directory Server 9 Administration Guide.
- If not already done, enable replication on the Directory Server 8 instance.
- Create a replication on the Directory Server 8 server to point to the new Directory Server 9 instance.
- Initialize replication.
- Do this for each back end that needs to be migrated.
- Optionally, you can set up replication to other Directory Server 9 instances from the original Directory Server 9 instance.
After performing these steps, the Directory Server 9 instance will stay synchronized with the Directory Server 8 instance until the other Directory Server 9 instances can be put into production.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.