My server has broken and I had to urgently put it up again. I needed to reinstall the system and, since I was time constrained, I lazily just copied the directories I considered necessary (/etc
, /opt
, /root
and /var
) with cp
to an external disk and formatted the system.
Now, I need to restore my LDAP configuration and data, but I did not do a backup correctly. I still have every single file because they were stored in /var
, but copying them to the same place and starting slapd
fails. I get the following messages on /var/log/messages
:
Aug 25 21:02:33 localhost slapd[2664]: @(#) $OpenLDAP: slapd 2.4.38 (Aug 25 2014 16:04:17) $
@host:/var/tmp/portage/net-nds/openldap-2.4.38-r2/work/openldap-2.4.38-abi_x86_64.amd64/servers/slapd
Aug 25 21:02:33 localhost slapd[2667]: hdb_db_open: database "dc=my,dc=host,dc=com": alock package is unstable.
Aug 25 21:02:33 localhost slapd[2667]: backend_startup_one (type=hdb, suffix="dc=my,dc=host,dc=com"): bi_db_open failed! (-1)
Aug 25 21:02:33 localhost slapd[2667]: slapd stopped.
Aug 25 21:02:33 localhost /etc/init.d/slapd[2663]: start-stop-daemon: failed to start `/usr/lib64/openldap/slapd'
Aug 25 21:02:33 localhost /etc/init.d/slapd[2647]: ERROR: slapd failed to start
I reinforce that I both have the old configuration files and a verbatin database files copy. If it is possible to recover with it, how should I proceed?