1. Generate the sample data using the make-ldif tool on the first server.
    $ bin/make-ldif --templateFile config/MakeLDIF/example-10K.template \
      --ldifFile ldif/10K.ldif
  2. Select a server from which to import data, and to be the source for future initialization to other servers. Stop this server, import the sample LDIF and start again, or perform a task-based import-ldif with the connection options.
    $ bin/stop-server
    $ bin/import-ldif --backendID userRoot --ldifFile ldif/10K.ldif
    $ bin/start-server
  3. Enable replication by choosing a specific server and running dsreplication enable three times. For the first invocation, create the replication topology administrator with the name admin.
    $ bin/dsreplication enable --host1 austin01.example.com --port1 1389 \
        --bindDN1 "cn=Directory Manager" --bindPassword1 password \
        --replicationPort1 8989 --host2 austin02.example.com --port2 1389 \
        --bindDN2 "cn=Directory Manager" --bindPassword2 password \
        --replicationPort2 8989 --baseDN dc=example,dc=com --adminUID admin \
        --adminPassword password --no-prompt
        
    $ bin/dsreplication enable --host1 austin01.example.com --port1 1389 \
        --bindDN1 "cn=Directory Manager" --bindPassword1 password \
        --replicationPort1 8989 --host2 budapest01.example.com --port2 1389 \
        --bindDN2 "cn=Directory Manager" --bindPassword2 password \
        --replicationPort2 8989 --baseDN dc=example,dc=com --adminUID admin \
        --adminPassword password --no-prompt
        
    $ bin/dsreplication enable --host1 austin01.example.com --port1 1389 \
        --bindDN1 "cn=Directory Manager" --bindPassword1 password \
        --replicationPort1 8989 --host2 budapest02.example.com --port2 1389 \
        --bindDN2 "cn=Directory Manager" --bindPassword2 password \
        --replicationPort2 8989 --baseDN dc=example,dc=com --adminUID admin \
        --adminPassword password --no-prompt
  4. Initialize the other servers (the dc=example,dc=com replicas) from the server that had the data imported with import-ldif. To minimize the WAN transfers, initialize budapest02 from budapest01.
    $ bin/dsreplication initialize --hostSource austin01.example.com --portSource 1389 \
      --hostDestination austin02.example.com --portDestination 1389 \
      --adminUID admin --adminPassword password --baseDN dc=example,dc=com --no-prompt
    
    $ bin/dsreplication initialize --hostSource austin01.example.com --portSource 1389 \
      --hostDestination budapest01.example.com --portDestination 1389 \
      --adminUID admin --adminPassword password --baseDN dc=example,dc=com --no-prompt
    
    $ bin/dsreplication initialize --hostSource budapest01.example.com --portSource 1389 \
      --hostDestination budapest02.example.com --portDestination 1389 \
      --adminUID admin --adminPassword password --baseDN dc=example,dc=com --no-prompt
  5. View the state of replication.
    $ bin/dsreplication status --adminPassword password --no-prompt --displayServerTable --showAll