Offline backup and offline restore procedures for Security Directory Server database using DB2 backup and restore

You can know more about Offline backup and offline restore procedures for Security Directory Server database using DB2 backup and restore through the information provided here.

About this task

Backing up the directory database:
  1. Determine a secure location to store the files to be used for backup and recovery, such as a backup machine, separate media, etc. In the examples listed, the /safeplace directory is used as a location to store files. The DB2 instance owner must have write permission for the /safeplace directory.
  2. Save Security Directory Server configuration and schema files in a secure location. These files need to be updated only if you change the topology, configuration parameters, or schema. In the examples, the Security Directory Server instance and database are named ldapdb2.
    cp /home/ldapdb2/idsslapd-ldapdb2/etc/* /safeplace/etc
  3. Make sure that ibmslapd is not running.
    ibmslapd –I ldapdb2 -k
  4. Create a full database offline backup. You must run all DB2 commands as the DB2 instance owner.
    db2 force applications all
    db2 backup db ldapdb2 to /safeplace/sun-full-ldapdb2 
Restoring the directory database on a different machine:
  1. If necessary, install Security Directory Server.
  2. Configure a database, using the same information that was specified on the backup machine.
  3. Copy or ftp the configuration, schema, and backup image files from the backup machine to /safeplace on this machine.
  4. Copy the backed-up configuration and schema files to this machine.
    cp /safeplace/etc/* /home/ldapdb2/idsslapd-ldapdb2/etc
  5. Restore the directory database.
    db2 restore db ldapdb2 from /safeplace/sun-full-ldapdb2 replace existing
Note: In some versions, DB2 supports cross-platform backup and restore operations and mixed version backup and restore operations.From a Security Directory Server perspective, you cannot back up a database on one version of Security Directory Server and then restore that database on another version of Security Directory Server. It is advisable to use the same version of DB2 backup and DB2 restore for both DB2 operations.