Este conteúdo não está disponível no idioma selecionado.
Chapter 22. Setting up content synchronization using the SyncRepl protocol
To support the SyncRepl
protocol according to RFC 4533, Directory Server uses the Content Synchronization plugin. With the Content Synchronization plugin, LDAP servers and clients can use Red Hat Directory Server as a source to synchronize their local database with the changing content of the directory.
To use the SyncRepl protocol
, you need to perform the following configurations:
On the Directory Server side:
-
Configure the Content Synchronization and Retro Changelog plugins. The Retro Changelog plugin must log the
nsuniqueid
operational attribute. - Optional: Create a new user that your client will use to bind to Directory Server. The new user must have permissions to read the content in the directory. For details, see Adding an LDAP entry using the command line.
-
Configure the Content Synchronization and Retro Changelog plugins. The Retro Changelog plugin must log the
- Configure your client. For example, set the search base for a subtree to synchronize. For further details, see your client’s documentation.
The following procedure configures the Content Synchronization and Retro Changelog plugins by using the command line.
Prerequisites
-
You have
root
permissions.
Procedure
Verify if the Retro Changelog is enabled:
dsconf <instance_name> plugin retro-changelog show
# dsconf <instance_name> plugin retro-changelog show ... nsslapd-pluginEnabled: off
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the Retro Changelog plugin is disabled, enable it:
dsconf <instance_name> plugin retro-changelog enable
# dsconf <instance_name> plugin retro-changelog enable Enabled plugin 'Retro Changelog Plugin'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the
nsuniqueid
operational attribute with thetargetUniqueId
alias to the Retro Changelog plugin configuration:dsconf <instance_name> plugin retro-changelog add --attribute nsuniqueid:targetUniqueId
# dsconf <instance_name> plugin retro-changelog add --attribute nsuniqueid:targetUniqueId Successfully changed the cn=Retro Changelog Plugin,cn=plugins,cn=config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Apply the following recommendations to improve performance:
Configure the maximum age of the Retro Changelog entries. For example, set the age to
2
days (2d):dsconf <instance_name> plugin retro-changelog set --max-age 2d
# dsconf <instance_name> plugin retro-changelog set --max-age 2d Successfully changed the cn=Retro Changelog Plugin,cn=plugins,cn=config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you know which backend or subtree your client accesses to synchronize data, limit the scope of the Retro Changelog plugin. For example, to exclude the
cn=marketing,dc=example,dc=com
subtree, enter:dsconf <instance_name> plugin retro-changelog set --exclude-suffix "cn=marketing,dc=example,dc=com"
# dsconf <instance_name> plugin retro-changelog set --exclude-suffix "cn=marketing,dc=example,dc=com" Successfully changed the cn=Retro Changelog Plugin,cn=plugins,cn=config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Enable the Content Synchronization plugin:
dsconf <instance_name> plugin contentsync enable
# dsconf <instance_name> plugin contentsync enable Enabled plugin 'Content Synchronization'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Adjust the ACI to limit who can use the
SyncRepl
control. By default, Directory Server creates the following access control instruction (ACI) in theoid=1.3.6.1.4.1.4203.1.9.1.1,cn=features,cn=config
entry that enables all users to use theSyncRepl
protocol:aci: (targetattr != "aci")(version 3.0; acl "Sync Request Control"; allow( read, search ) userdn = "ldap:///all";)
aci: (targetattr != "aci")(version 3.0; acl "Sync Request Control"; allow( read, search ) userdn = "ldap:///all";)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For details about how to adjust the ACI, see Defining ACI bind rules.
Restart the server:
dsctl <instance_name> restart
# dsctl <instance_name> restart
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Now your clients can synchronize data with Directory Server by using the SyncRepl
protocol.