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

confusing manpage for slapcat for backup



I have some questions:

When I look at manpage for slapcat from openldap-servers-2.3.27-5 in Centos5.0, it says:

LIMITATIONS
       In general, your slapd(8) should not be running (at least, not in read-
       write mode) when you do this to ensure consistency of the database.

But when I look at its manpage from openldap-servers-2.3.43-3.el5 in Centos5.4, it says:

LIMITATIONS
       For some backend types, your slapd(8) should not be running (at  least,
       not  in  read-write mode) when you do this to ensure consistency of the
       database. It is always safe  to  run  slapcat  with  the  slapd-bdb(5),
       slapd-hdb(5), and slapd-null(5) backends.

Question 1: Is it always safe to run slapcat with slapd running even for openldap-servers-2.3.27-5 in Centos5?

The administration guide for OpenLDAP 2.4 at http://www.openldap.org/doc/admin24/maintenance.html explains more on this, I quote:

"2. Periodically run slapcat and back up the LDIF file:

Slapcat can be run while slapd is active. However, one runs the risk of an inconsistent database- not from the point of slapd, but from the point of the applications using LDAP. For example, if a provisioning application performed tasks that consisted of several LDAP operations, and the slapcat took place concurrently with those operations, then there might be inconsistencies in the LDAP database from the point of view of that provisioning application and applications that depended on it. One must, therefore, be convinced something like that won't happen. One way to do that would be to put the database in read-only mode while performing the slapcat. The other disadvantage of this approach is that the generated LDIF files can be rather large and the accumulation of the day's backups could add up to a substantial amount of space.

You can use slapcat(8) to generate an LDIF file for each of your slapd(8) back-bdb or back-hdb databases.

    slapcat -f slapd.conf -b "dc=example,dc=com"

For back-bdb and back-hdb, this command may be ran while slapd(8) is running."

Question 2: Is the above also true for openldap-servers-2.3.27-5 in Centos5?

Question 3: How to put the database in read-only mode while performing the slapcat? Is there anyone who's doing this just to make sure for consistent backup?

Thanks,
Hai