HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

1. Create a replication agreement.
2. Export the replica on the supplier server to an LDIF file.
See “Exporting a replica to LDIF” (page 374).
3. Import the LDIF file with the supplier replica contents to the consumer server.
See “Importing the LDIF file to the consumer server” (page 374).
8.10.4.1 Exporting a replica to LDIF
There are three ways to convert a replica database to LDIF:
When creating a replication agreement, by selecting Create consumer initialization file in the
Initialize Consumer dialog box of the Replication Agreement Wizard.
From the Directory Server Console, by right-clicking the replication agreement under the
Replication folder and choosing Create LDIF File from the pop-up menu.
From the command line by using the export command, as described in “Exporting to LDIF
from the command line” (page 158). Exporting to LDIF with any of the command-line tools
requires using an option to export the database as a replica; this means that the exported
LDIF contains the proper entries to initialize the consumer when the LDIF is imported.
For the db2ldif and db2ldif.pl scripts, this is the -r option. For example:
db2ldif -r -n database1 -a /home/files/output.ldif
For the cn=export, cn=tasks, cn=config entry, this is the nsExportReplica attribute.
ldapmodify -a -D "cn=directory manager" -w secret -p 389 -h server.example.com
dn: cn=example export, cn=export, cn=tasks, cn=config
objectClass: top
objectClass: extensibleObject
cn: example export
nsInstance: userRoot
nsFilename: /home/files/example.ldif
nsExportReplica: true
8.10.4.2 Importing the LDIF file to the consumer server
Import the LDIF file that contains the supplier replica contents to the consumer server by using the
import features in the Directory Server Console or by using either the ldif2db script or
ldif2db.pl script. Both import methods are described in “Importing from the command line (page
151).
NOTE:
With the ldif2db.pl script, the LDIF file import operation does not require a server restart. For
more information on command line scripts, see the HP-UX Directory Server configuration, command,
and file reference.
8.10.5 Filesystem replica initialization
A very large database, such as one with several million entries, can take an hour or more to
initialize a consumer from the Console or even with manual initialization. To save time, use filesystem
replica initialization.
Directory Server has the capability to initialize a replica using the database files from the supplier
server. This avoids the need to rebuild the consumer database and can be done at essentially the
speed of the network between the two servers by transferring the files with FTP or NFS, for example.
Instead of sending entries via LDAP to replica servers, filesystem replica initialization populates
the new database on the destination server by backing up the supplier database on one server
and restoring the database on the destination server.
374 Managing Replication