Online initialization of a replicated suffix by using DSCC is
an easy way to initialize or reinitialize a consumer. However, if you are
initializing a large number of entries, this process can be time consuming.
In this case, you might find offline consumer initialization with the command
line more efficient.

Ensure that you have set up replication agreements.

You
must do this before you initialize replicas.

Export the original copy of the suffix data from a master replicated
suffix to an LDIF file.

In a multimaster replication environment, you can use the LDIF file
exported from the original master to initialize both the other masters and
any consumers. In a cascading replication environment, you can use the same
file to initialize both the hub replicas and their consumers.

In all cases, you must start with an LDIF file that has been exported
from a configured master replica. You cannot use an arbitrary LDIF file to
initialize all replicas because it does not contain replication metadata.

If you are initializing a fractional replica, filter the file
to keep only the replicated attributes, then transfer that file to all of
the consumer servers.

Filtering an LDIF File for Fractional Replication

Initializing a replica with fractional replication configured is transparent
when using DSCC. Only the selected attributes will be sent to the
consumer during the initialization.

If you have configured fractional replication, you should filter out
any unused attributes before copying the exported LDIF file to the consumer
servers. Directory Server provides the fildif tool for
this purpose. This tool filters the given LDIF file to keep only the attributes
that are allowed by the attribute set defined in your replication agreement.

This tool reads the server’s configuration to determine the attribute
set definition. To read the configuration file, the fildif tool
must be run as root or as the user who owns the process and the files (specified
by the nsslapd-localuser attribute). For example, the following
command filters the file exported from the dc=example,dc=com suffix
in the previous example:

The -i and -o options are the
input and output files, respectively. The -b option is
the DN of the replication agreement where fractional replication is defined.
You can find this DN by using this command:

For the full command-line syntax for the fildif tool,
see the fildif(1) man
page.

You can then use the filtered.ldif file produced
by fildif to initialize the consumer in this replication
agreement. Transfer the file to the consumer server and import it as described
in Importing Data From an LDIF File.