
that has an LDAP client, using an authenticated LDAP bind. Of course, the LDAP
communication can also be secured with SSL.
1
To create an LDIF file similar to that created during an offline logical backup,
proceed as follows:
ldapsearch -x -D
adminDN
❶
-w
adminPassword
❷
-H ldap://
LDAPServer
/
❸
-b
baseDN
❹
> "ldap.$(date '+%F-%T')"
❶
DN of the administrator user (for example,
cn=admin,o=mycorp,c=us
).
❷
The administrator password (for example,
secret
).
❸
LDAP server name or IP address.
❹
Base DN (distinguished name) of the LDAP structure (for example,
o=mycorp,c=us
).
2
To use LDAP with SSL, enter the following instead:
ldapsearch -x -D
adminDN
-w
adminPassword
-H ldaps://
LDAPServer
/ -b
baseDN
> "ldap.$(date '+%F-%T')"
Restoring an Online Backup (page 196) describes how to restore an online backup.
15.4 Restoring Data
Procedure 15.1
Restoring an Offline Backup
To restore offline backups, you need to stop and restart the LDAP server afterward.
1
Stop the LDAP server with
rcldap stop
2
If you did a physical file backup, restore the files in
/var/lib/ldap
by
copying them back or extracting them from the archive you created.
or
If you did a logical backup, run the
slapadd
command to restore the logical
database dump:
Backup and Restore
195