Show Table of Contents
5.3. Database Migration Methods
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.7. Exporting and importing two back ends from and to a single instance
- On Directory Server 9, 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 Directory Server 10 instance, use the
ldif2dbutility by running the following commands:
# ldif2db -Z instance_name -n userRoot -i /tmp/userRoot.ldif
# ldif2db -Z instance_name -n backend2 -i /tmp/backend2.ldif
5.3.2. The Replication Migration Method
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.
220.127.116.11. 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 10 Administration Guide.
- If not already done, enable replication on the Directory Server 9 instance.
- Create a replication on the Directory Server 9 server to point to the new Directory Server 10 instance.
- Initialize replication.
- Do this for each back end that needs to be migrated.
- Optionally, you can set up replication to other Directory Server 10 instances from the original Directory Server 10 instance.
After performing these steps, the Directory Server 10 instance will stay synchronized with the Directory Server 9 instance until the other Directory Server 10 instances can be put into production.