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

Re: Accesslog purge doesn't work in Openldap 2.4.21 - Ubuntu Lucid



Hi,

To be honest, I'm not a guru in Openldap, I didn't know that BerkeleyDB could be running with OpenLDAP. So, thank you very much, you have opened my mind.

I set the flag DB_LOG_AUTOREMOVE in DB_CONFIG file, first I've stopped ldap (/etc/init.d/slapd stop), then I've changed the file DB_CONFIG, and then I've restarted slapd again. After doing this I've restarted even the server but the log.* files are still there :(

I've been searching what package should I install in the server in order to have the db_archive, db_checkpoint... utilities and I find that I could install the BerkeleyDB but not an isolated package for Ubuntu Server 10.10 LTS...

Seriously, thank you VERY much.

On Wed, Jul 4, 2012 at 5:27 PM, Brandon Hume <hume-ol@bofh.ca> wrote:
 On 07/ 4/12 07:05 AM, Miguel Montero Rodríguez wrote:

I've just seen that /var/lib/ldap/accesslog is growing so I've realized that olcAccessLogPurge is not working properly (for example, I have log.0000000001 file from 2011-09-10).

I believe you're confusing the accesslog purge with BerkeleyDB's internal bookkeeping.  olcAccessLogPurge will configure slapd cleaning out old LDAP entries which are used as the accesslog.  But remember that OpenLDAP runs on *top* of BerkeleyDB, if you're using the BDB and/or the HDB backends.  The log.* files in your data directory are there as part of BerkeleyDB, and OpenLDAP doesn't know about them.

You'll want to investigate the db_checkpoint and db_archive (specifically db_archive -a) commands, which will tell you which of those log.* files are old and unused and can be removed.  You might also be interested in the DB_LOG_AUTOREMOVE flag in DB_CONFIG.

If you're running a modern release (and, really, if you participate in this list that's not optional...) you can also investigate using mdb as the backend, which does away with those files altogether.