免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6130 | 回复: 6
打印 上一主题 下一主题

[ldap] 请教一个openldap的我问题,服务器突然断电,数据丢失的问题! [复制链接]

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2015-08-23 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-05-23 11:39 |只看该作者 |倒序浏览
我用的是 openldap 2.16  在linux as 3 上运行,当服务器突然断电后,我往ldap上录入的数据全部丢失,有时可能是前几天的数据,一直没找出原因,请大家帮忙分析一下!

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2015-08-23 06:20:00
2 [报告]
发表于 2005-05-30 10:47 |只看该作者

请教一个openldap的我问题,服务器突然断电,数据丢失的问题!

自己在顶一下

论坛徽章:
0
3 [报告]
发表于 2005-05-30 11:52 |只看该作者

请教一个openldap的我问题,服务器突然断电,数据丢失的问题!

Please run "db_recover".

I assume you are using "bdb" database.

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2015-08-23 06:20:00
4 [报告]
发表于 2005-05-31 12:30 |只看该作者

请教一个openldap的我问题,服务器突然断电,数据丢失的问题!

我查了一下.db_recover :
        ldap要停掉,然后db_recover ,在启动ldap ,我是想能不能每次入库的ldap数据立即同步到ldap数据库中.而不是在内存中,当突然停电后,数据就会丢失(我用的是 bdb 4.1.25),请大家帮忙解决一下!

论坛徽章:
0
5 [报告]
发表于 2005-05-31 21:01 |只看该作者

请教一个openldap的我问题,服务器突然断电,数据丢失的问题!

Pls upgrade to BDB 4.2.52 + 2 patches.

# cd /var/tmp
# wget http://www.sleepycat.com/update/snapshot/db-4.2.52.tar.gz
# wget http://www.sleepycat.com/update/4.2.52/patch.4.2.52.1
# wget http://www.sleepycat.com/update/4.2.52/patch.4.2.52.2
# gzip –d db-4.2.52.tar.gz
# tar xvf db-4.2.52.tar
# chmod u+w db-4.2.52/mp/mp_fget.c
# chmod u+w db-4.2.52/lock/lock.c
# cd db-4.2.52
# patch -i ../patch.4.2.52.1
# patch -i ../patch.4.2.52.2

OpenLDAP upcoming version 2.3 is said to have auto-detection and update of DB checkpoint changes.

OR you may download Symas's CDS from http://www.symas.com, which is OpenLDAP 2.2.X modified with this auto features.

See:
http://www.openldap.org/lists/openldap-software/200501/msg00303.html

Gary

论坛徽章:
0
6 [报告]
发表于 2005-06-01 11:57 |只看该作者

请教一个openldap的我问题,服务器突然断电,数据丢失的问题!

Please read this related info:

http://www.openldap.org/faq/data/cache/1162.html

===

If you put "checkpoint 1024 5" in slapd.conf (to checkpoint after 1024kb or 5 minutes, for example), this does not checkpoint every 5 minutes as you may think. The explanation from Howard is:
``In OpenLDAP 2.1 and 2.2 the checkpoint directive acts as follows - *when there is a write operation*, and more than <check>; minutes have occurred since the last checkpoint, perform the checkpoint. If more than <check>; minutes pass after a write without any other write operations occurring, no checkpoint is performed, so it's possible to lose the last write that occurred.''

In other words, a write operation occurring less than "check" minutes after the last checkpoint will not be checkpointed until the next write occurs after "check" minutes have passed since the checkpoint.

This has been modified in 2.3 to indeed checkpoint every so often; in the meantime a workaround is to invoke "db_checkpoint" from a cron script every so often, say 5 minutes.

===

Gary

论坛徽章:
0
7 [报告]
发表于 2005-06-17 10:27 |只看该作者

请教一个openldap的我问题,服务器突然断电,数据丢失的问题!

在openldap的 slapd.conf中有一个参数,是来控制数据同步的,也就是决定什么时候把内存的中的数据 保存到硬盘中  我猜测你的这个参数没有配置 dbnosync
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP