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

Re: hot backups for openldap bdb backend.



what do you mean by hot ? while slapd is running ? i had problems doing that !

in terms of backup, I just know that the following did worked (with slapd down !) for me once:

[root@corbeau /var/lib/ldap/int]
$ /usr/sbin/slapd_db_archive -s -v
IntEPersInetServ.bdb
cn.bdb
dn2id.bdb
gidNumber.bdb
givenName.bdb
id2entry.bdb
mail.bdb
objectClass.bdb
sn.bdb
uid.bdb
uidNumber.bdb
[root@corbeau /var/lib/ldap/int]
$ /usr/sbin/slapd_db_archive -v
log.0000000001
log.0000000002
log.0000000003
log.0000000004
log.0000000005
log.0000000006
log.0000000007

[root@corbeau /var/lib/ldap/int]
$ cp log.0000000008 ../int.sav/
[root@corbeau /var/lib/ldap/int]
$ cp IntEPersInetServ.bdb cn.bdb dn2id.bdb gidNumber.bdb givenName.bdb
id2entry.bdb mail.bdb objectClass.bdb sn.bdb uid.bdb uidNumber.bdb ../int.sav/
[root@corbeau /var/lib/ldap/int]
$ rm *


$ cp ../int.sav/* .
[root@corbeau /var/lib/ldap/int]
$ ls
cn.bdb gidNumber.bdb IntEPersInetServ.bdb objectClass.bdb uidNumber.bdb
DB_CONFIG givenName.bdb log.0000000008 sn.bdb
dn2id.bdb id2entry.bdb mail.bdb uid.bdb
You have new mail in /var/spool/mail/root
$ chown ldap:ldap *
$ /etc/init.d/ldap start


Actually I'am more familiar with a trditional ldif (slapcat) of the database ... but if there's a better way to do it, please let me know .

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



Thanks

Peter Johnson	
Humboldt State University
707-826-6122




-- Jehan Procaccia | Ingenieur Systemes & Reseaux Institut National des Telecommunications| Tel : +33 (0) 160764436 MCI, Moyens Communs Informatiques | Mail: Jehan.Procaccia@int-evry.fr 9 rue Charles Fourier 91011 Evry France | Fax : +33 (0) 160764321