Online Backup; Restore - Novell SLRS 8 Admin Manual

Table of Contents

Advertisement

14 Best Practices
slapcat >ldap.$(date +'%Y%m%d-%T')
This will generate an LDIF (LDAP Data Interchange Format) file named ldap.<datetime>
where <datetime> is the current date and time. The output file can be
archived, backed up on offline media, and restored with the slapadd com-
mand. The LDIF file is a structured ASCII file that can be viewed, for example,
with the less command.
After the backup completes, the LDAP server must be started again:
/usr/sbin/rcldap start

14.1.2 Online Backup

Online backup uses the LDAP server to extract all data. This has the advantage
that the server is available at all times and that the backup can be taken from
a remote machine that has an LDAP client.
To get an online backup, run the command
ldapsearch -h <LDAPServer> -x -b <baseDN>
>ldap.$(date +'%Y%m%d-%T')
where <LDAPServer> is the LDAP server name or IP address and <baseDN>
is the LDAP base DN (distinguished name) of the LDAP structure, in our ex-
amples, o=mycorp,c=de.
If access controls were implemented on the LDAP server, an authenticated
LDAP bind must be used. The command above should be extended by the
following arguments:
ldapsearch -x -D <adminDN> -w <adminPassword> ...
where <adminDN> is the DN of the administrator user (in our examples
cn=admin,o=mycorp,c=de) and <adminPassword> is this user's password
(in our examples, secret).
This will again create an LDIF file like the slapcat command above. This file
must be added to the LDAP server with the ldapadd command. Do not use
slapadd with this file.

14.1.3 Restore

To restore an offline backup, first stop the LDAP server:
/usr/sbin/rcldap stop
Then either restore the physical database files in /var/lib/ldap/ or run the
slapadd command to restore the logical database dump:
slapadd -l <backupfile>
where <backupfile> is the file created by slapcat.
Then start the LDAP server again:
/usr/sbin/rcldap start
To restore an online backup, the LDAP server must be running. The LDAP
138

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux retail solution 8

Table of Contents