Hello, I'm using openldap 2.4.11 on linux x86 system, with one database bdb backend, with the following options in slapd.conf file:
database bdb [..] dbnosync cachesize 1000 checkpoint 0 0 [..]
Is it possible to disable bdb log.00000[0..n] files completely? I can slapcat the database, then remove these, slapadd and reindex database, and there's no logs, but is it possible to avoid creating them? Or set up some limit of numer/size of them ? Let's assume I don't need logs. I hate logs. I don't wany any logs, whatever :) I reviewed bdb documentation, but there's no clear information how to control this.
Additionally - when I have a "DB_CONFIG" file in /etc/ldap, and a DB_CONFIG file in database storage dir, e.g. /var/lib/ldap, which one is actually used? My guess'd be /var/lib/ldap/DB_CONFIG, but I'd like to know for sure :-)
Regards, Piotr Wadas
Piotr Wadas pwadas@dtpw.pl writes:
Hello, I'm using openldap 2.4.11 on linux x86 system, with one database bdb backend, with the following options in slapd.conf file:
database bdb [..] dbnosync cachesize 1000 checkpoint 0 0 [..]
Are you really sure to not have any checkpointing?
Is it possible to disable bdb log.00000[0..n] files completely? I can slapcat the database, then remove these, slapadd and reindex database, and there's no logs, but is it possible to avoid creating them? Or set up some limit of numer/size of them ? Let's assume I don't need logs. I hate logs. I don't wany any logs, whatever :) I reviewed bdb documentation, but there's no clear information how to control this.
The log files are transaction logs, the information in this log files is required for database recovery.
Additionally - when I have a "DB_CONFIG" file in /etc/ldap, and a DB_CONFIG file in database storage dir, e.g. /var/lib/ldap, which one is actually used? My guess'd be /var/lib/ldap/DB_CONFIG, but I'd like to know for sure :-)
The DB_CONFIG file is to be placed in the database directory, that is in your case most likely /var/lib/ldap
-Dieter
The log files are transaction logs, the information in this log files is required for database recovery.
Let's say I don't care about database recovery, I have a system with a lot of RAM, and I keep whole database, including transaction logs (300-500mb total) on ramdisk, I do slapcat with frequency, which satisfies me - if some crash occurs, I accept lose of some fresh changes, and restore/reindex the whole database from last dump, skipping the whole concern of database fix/recovery.
So, is it possible to flush/purge/disable transaction logs definitely?
Regards, PW
I'm using openldap 2.4.11 on linux x86 system, with one database bdb backend, with the following options in slapd.conf file:
database bdb [..] dbnosync cachesize 1000 checkpoint 0 0 [..]
You should set non-zero checkpoints, or there is no guarantee that you will have any data after unexpected shutdown.
Is it possible to disable bdb log.00000[0..n] files completely?
Yes, but that is a bad idea.
I can slapcat the database, then remove these, slapadd and reindex database, and there's no logs, but is it possible to avoid creating them? Or set up some limit of numer/size of them?
In your DB_CONFIG add
set_flags DB_LOG_AUTOREMOVE
This will cause transaction logs to be removed after they are no longer necessary for db recovery. (typically 2-6 10MByte logs will exist)
Additionally - when I have a "DB_CONFIG" file in /etc/ldap, and a DB_CONFIG file in database storage dir, e.g. /var/lib/ldap, which one is actually used? My guess'd be /var/lib/ldap/DB_CONFIG, but I'd like to know for sure :-)
DB_CONFIG only configures BDB; it must be in the database environment directory.
You can use symbolic links to point to it from other locations, however.
Matthew Backes Symas Corporation mbackes@symas.com
openldap-software@openldap.org