[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: "bulk-reload" of database and replication

On Tuesday 28 October 2008 17:22:58 Sebastian Benoit wrote:
> Hi,
> we are developing a application using openldap and have the following
> problem:
> We plan a setup using one master-ldap server (with normally few write
> operations). The database will be replicated to (initially) two
> slave-servers using syncrepl replication.
> Now, at the beginning (until the complete system is set up to work with the
> ldap-server) we will need to re-initialize the complete database from
> scratch.
> This reload takes about 10 minutes using perl-ldap and a tcp-connection to
> the server. During this time the application accessing the slave servers
> should still see the old view of the database. The switch from old data to
> new data on the slave-servers should be as fast as possible to avoid
> clients seeing wrong (or not existing) data.
> I thought about writing data in LDIF format

For which you should use slapcat.

> and the create a new database
> from that using slapadd. But then there still is the replication problem.

What replication problem?

> What methods to others use to solve this?

As long as you are using sync-repl for replication, and you use an export of 
the master created with 'slapcat', there is no problem.