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

Re: Openldap 2.1.3 - Berkeley BDB 4.0 database backup inconsistencies

Hello Tony,

Saturday, July 27, 2002, 5:34:17 PM, you wrote:

TE> My experience is, that even by following the docs for deleting Berkeley
TE> DBD 4.0/Openldap 2.1.3 log files and creating new, with db_checkpoint,
TE> it just does not work. Newly created logfiles give unrecovorable errors
TE> with slapd. Even with a minimum, often with more, of 2 db_checkpoints in
TE> advance and db_recover -c.  Punctum finale.

[the rest skipped]

Are You sure You can run db_checkpoint safely? BDB is an `embedded'
DB, so I'm not sure all `destructive' tools are known to be
`consistent' across processes. I mean external programs, not own slapd
threads. I guess the (only) way is to use slapd-bdb(5) `checkpoint'
directive and BDB db_archive(1) tool.

Since db_archive detects log files not being in use I consider it
`safe'. So, I ask You to carry out the following experiment (I'm
interested in that, too):

Set BDB backend `checkpoint' option:

database bdb
checkpoint 1024 0

By that I expect BDB backend to checkpoint it's log every 1024k
regardless of time. Then, make some kind of

/usr/bin/db_archive -a -h /path/to/ldap/bdb | xargs gzip -9


for log in `/usr/bin/db_archive -a -h /path/to/ldap/bdb`; do
  /bin/mv -f "${log}" /path/to/backup

to run every hour.

Does it still ruin Your database? Please let me know.

Thank You.

Best regards,
 Peter                            mailto:spam4octan@highway.ru