openldap 数据文件,它们是什么样子的
从我的 slapd.conf 文件中,我可以看到数据的存储位置。当我查看该数据目录时,我看到两种文件,一种类型是 .bdb
文件,它们似乎是数据文件,因为它是配置文件中定义的扩展名。但是,我还有一堆日志文件,当我尝试在 vi 中读取它们时,它们似乎是二进制的。我不确定他们是否应该在那里,或者这是否是我之前的人的疏忽。如果我想从 .ldif 文件恢复,删除所有日志文件是否会丢失任何内容?我只需要删除 bdb 文件吗?
from my slapd.conf file, i see where my data is stored. when I look into that data directory i see two kinds of files, one type are .bdb
files which appear to be the data files as that is the extension defined in the config file. But, I also have a bunch of log files, which appear to be binary when I try to read them in vi. I'm not sure if they are supposed to be there or if this is an oversight by someone previous to me. If I want to restore from an .ldif file, am I loosing anything by deleting all the log files? do I just need to delete the bdb files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它们是 Berkeley DB 文件。
例如,在 Ubuntu 10.04 上,您可以安装
db4.7-util
软件包并使用各种db4.7_*
utils(例如db4.7_*
)获取一些信息。 7_dump 或db4.7_stat
)。话虽这么说,数据库的结构实际上取决于 OpenLDAP 的编码方式(它是一种内部格式,因此除非您真的想深入研究它,否则它不是特别有用)。如果要从 LDIF 文件恢复,请使用 LDAP 客户端或 OpenLDAP 命令,例如
ldapadd
。They are Berkeley DB files.
On Ubuntu 10.04, for example, you can install the
db4.7-util
package and get some information using the variousdb4.7_*
utils (e.g.db4.7_dump
ordb4.7_stat
). This being said, the structure of the database really depends on how OpenLDAP is coded (it's an internal format, so it's not particularly useful unless you really want to dig into it).If you want to restore from an LDIF file, use LDAP clients or OpenLDAP commands such as
ldapadd
.