On Wed, 09 Feb 2011 09:22 +0200, "Buchan Milne" <[email protected]> wrote: > On Tuesday, 8 February 2011 23:48:02 [email protected] wrote: > > This may have been discussed, but i can not seem to find out why the > > transaction logs are not getting removed when I use DB_LOG_AUTOREMOVE in > > DB_CONFIG. This is on a Redhat 5 openldap 2.3 server. > > > > DB_CONFIG has the following: > > set_lg_dir /var/lib/ldap/bdblogs > > set_flags DB_LOG_AUTOREMOVE > > > > Doing slapd_db_archive shows about 134 unused files. > > > > I then did the following (is this the correct procedure to use when > > > > updating DB_CONFIG?): > > > serivice ldap stop > > > Edited DB_CONFIG > > > slapd_db_recover > > If your working directory is not the database directory, you need to > supply -h > /var/lib/ldap or similar to all db_* tools (including the slapd_db_* > versions). > > > > slapd_db_archive > > > service ldap start > > Some other packages provide a 'service ldap recover' or 'service ldap2.4 > recover' which does all of this for you ... > > Regards, > Buchan >
Maybe I just don't understand how this log removal is suppose to function. I'm confused by the comments above since all the db tools seem to find the logs fine. Giving the -h option seems to have no effect. It seems that since the "set_lg_dir /var/lib/ldap/bdblogs" is in DB_CONFIG the slapd_db_archive command fines the logs just fine. For a test I moved all the logs (135) up one directory to the location of the db and the DB_CONFIG file, stopped slapd, recovered the db, restarted slapd. At this point 135 log.xxx files are in the directory, I ran slapd_db_archive and it shows 134 of the files are not being used. I would have thought that with the set_flags DB_LOG_AUTOREMOVE set in DB_CONFIG it would remove the log.xxx files that slapd_db_archive says is not needed. Is this how it works? Or do they eventually get removed based on some other criteria?
