|OpenLDAP Faq-O-Matic : OpenLDAP Software FAQ : Maintenance : How to maintain Berkeley DB (logs etc.) ?|
Berkeley DB log files grow, and the administrator has to deal with it. The procedure is known as log file archival or log file rotation. Please NOTE THAT ACTUAL LOG FILE ROTATION is handled by the Berkeley DB engine.
Logs of current transactions need to be stored into files so that the database can be recovered in the event of an application crash. Administrator can change the size limit of a single log file (by default 10MB), and have old log files removed automatically, by setting up DB environment (see below). The reason Berkeley DB never deletes any log files by default is that the administrator may wish to backup the log files before removal to make database recovery possible even after a catastrophic failure, such as file system corruption.
Log file names are
The files with names __db.001, __db.002, etc are just shared memory regions (or whatever). These ARE NOT `logs', they must be left alone. Don't be afraid of them, they do not grow like logs do.
Advanced installations can use special environment settings to fine-tune some Berkeley DB options (change the log file limit, etc). This can be done by using
WARNING: options set in
The advantages of
To figure out the best-practice BDB backup scenario reader is highly recommended to read the whole Chapter 9: Berkeley DB Transactional Data Store Applications. This chapter is a set of small pages with examples in C language. Non-prorgamming people can skip this examples without loss of knowledge.
|When having problems with the bdb logs (notably logs growth rate), one may check that slapd bdb parameters are configured properly. See man slapd-bdb for details.|
Suggestions on logging mechanism tunig might be to adjust checkpoint parameter (so that data and logs are synchronised at some time without waiting for slapd to terminate), for instance. Also the size of the log buffers may be of importance. See http://www.openldap.org/faq/data/cache/893.html for useful details.
|Oracle have moved their site around, and so now the old links are broken.
The Berkeley DB reference guide is here:|
|[Append to This Answer]|
|Previous:||How do I export my directory in LDIF format?|
|Next:||Why isn't checkpointing working?|