HP OSMS Blueprint: Directory Services on HP ProLiant and HP Integrity Servers with RHEL5

Table Of Contents
6. Before you reload the data from the LDIF file, shut down the CDS server by entering the
following command:
# /etc/init.d/cdsserver stop
7. Reload data from the LDIF file using the slapadd utility by entering the following command:
# /opt/symas/bin/slapadd -l backup.ldif
8. Restart the CDS server and check the restored data by entering the following commands:
# /etc/init.d/cdsserver start
# /opt/symas/bin/slapcat
Recovering the Berkeley DB
The db_archive and db_recover utilities are used for normal recovery or disaster recovery
for the Berkeley DB data, which is the back-end database of CDS server. The following example
procedure shows how to use the db_archive and db_recover utilities to backup and recover
data.
1. Stop the CDS server and force a checkpoint of the log or archive using the db_checkpoint
utility by entering the following commands:
# /etc/init.d/cdsserver stop
# /opt/symas/bin/db_checkpoint -1 -h /var/symas/openldap-data/example/
2. Archive the data files by entering the following command:
# /opt/symas/bin/db_archive -s -h /var/symas/openldap-data/example/
3. To back up the Berkeley DB data files, copy these files to another directory or server, for
example /databackup, using the following commands:
# mkdir /databackup
# cp /var/symas/openldap-data/example/*db.00* /databackup
# cp /var/symas/openldap-data/example/*.bdb /databackup
4. Archive and copy the log files by entering the following commands:
# mkdir /logbackup
# /opt/symas/bin/db_archive -l -h /var/symas/openldap-data/example/
# cp /var/symas/openldap-logs/example/log.0000000001 /logbackup
5. For the test in this example, delete all CDS data manually and verify the results by entering
the following commands:
# /etc/init.d/cdsserver start
# /opt/symas/bin/ldapdelete -x -D 'cn=Manager,dc=example,dc=com' \
-w secret -r dc=example,dc=com
# /opt/symas/bin/slapcat
6. To recover the data from the backup using the db_recover utility, restore data files from
the backup media by entering the following commands:
# /etc/init.d/cdsserver stop
# cp /databackup/*db.00* /var/symas/openldap-data/example/
# cp /databackup/*.bdb /var/symas/openldap-data/example/
7. Restore the transaction log files from the backup media by entering the following command:
# cp /logbackup/log.0000000001 /var/symas/openldap-logs/example/
16