HP-UX Directory Server 8.1 administrator guide
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”.
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.
This method of initializing consumers is especially useful in replication over wide-area networks
or over networks with slow or unstable connections.
For smaller databases, HP recommends using manual initialization or initialize consumers from
the Console.
NOTE:
The destination server must have the same architecture and the same bit size as the supplier
server for the initialization to succeed.
8.10.5.1 Initializing the consumer replica from the backup files
1. Create a new database on the destination server to match the database from the source
server.
Before initializing the consumer from the backup files, be certain that the appropriate database
has been created on the destination server so that the database exists to be restored and
initialized.
2. Enable replication on the back-end as a dedicated consumer.
3. If there is already a replication agreement to that host and port, then replication should
resume immediately after running the restore script. Otherwise, create the replication
agreement on the source server (or whatever server is the supplier), and select the Do not
initialize consumers at this time radio button.
4. Stop the source Directory Server if it is running. For example:
/opt/dirsrv/slapd-instance_name/stop-slapd
5. From the command line, run the db2bak utility, and archive the current directory installation.
/opt/dirsrv/slapd-instance_name/db2bak
376 Managing replication