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

Re: hot backups for openldap bdb backend.



Peter Johnson wrote:
Hi,

I'm tring to do hot backups of my openldap server using db_archive and db_recover. Whenever I try using either of these commands I get a 'log record size mismatch' error. What am I doing wrong? Is there a mailing list for bdb? I didn't see on on the sleepycat.com site.


-- [oracle@server3837 openldap-reload]# /usr/local/BerkeleyDB.4.1/bin/db_archive -l -P xxxxxxx -v
db_archive: log record size mismatch
db_archive: DB_LOGC->get: invalid log record header
db_archive: PANIC: Input/output error
db_archive: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
db_archive: open: DB_RUNRECOVERY: Fatal error, run database recovery

Stop the slapd daemon and do 'db_recover -c'. You don't use db_archive for backup, simply for listing log files that can be backed up. Do not use '-l' for this. If it doesn't return anything, you can't back anything up. At least not the log file(s) - you can do a "hot" slapcat to get an ldif file that you can use to create a new database in an emergency.


To back up valid log files, you only need to copy/move them to another directory, a backup medium or whatever. You can create a complete database from a valid log file simply by running 'db_recover -c' on it.

--Tonni

--
Tony Earnshaw

Millom kaksar eg litet kann trivast, millom jamningar helst er eg nøgd

http://www.billy.demon.nl
Mail: tonni@billy.demon.nl