Sun Java System Directory Server Enterprise Edition 6.3 Deployment Planning Guide

Designing Backup and Restore Policies

In any failure situation that involves data corruption or data loss, it is imperative that you have a recent backup of your data. Avoid reinitializing servers from other servers where possible. For information about how to back up data, seeChapter 9, Directory Server Backup and Restore, in Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide.

This section provides an overview of what to consider when planning a backup and recovery strategy.

High-Level Backup and Recovery Principles

Apply the following high-level principles when designing a backup strategy:

Choosing a Backup Method

Directory Server Enterprise Edition provides two methods of backing up data: binary backup and backup to an LDIF file. Both of these methods have advantages and limitations, and knowing how to use each method will assist you in planning an effective backup strategy.

Binary Backup

Binary backup produces a copy of the database files, and is performed at the file-system level. The output of a binary backup is a set of binary files containing all entries, indexes, the change log, and the transaction log. A binary backup does not contain configuration data.

Binary backup is performed using one of the following commands:

Binary backup has the following advantages:

Binary backup has one limitation. Restoration from a binary backup can be performed only on a server with an identical configuration.

This limitation implies the following:

At a minimum, you need to perform a regular binary backup on each set of coherent machines. Coherent machines are machines that have an identical configuration, as defined previously.


Note –

Because restoration from a local backup is easier, perform a binary backup on each server.


These abbreviations are used in the remaining diagrams in this chapter:

M = master replica 

RA = replication agreement 

The following figure assumes that M1 and M2 have an identical configuration and that M3 and M4 have an identical configuration. In this scenario, a binary backup would be performed on M1 and on M3. In the case of failure, M1 or M2 could be restored from the binary backup of M1 (db1). M3 or M4 could be restored from the binary backup of M3 (db2). M1 and M2 could not be restored from the binary backup of M3. M3 and M4 could not be restored from the binary backup of M1.

Figure 8–2 Offline Binary Backup

Offline binary backup of two servers to two separate
databases

For details on how to use the binary backup commands, see Binary Backup in Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide.

Backup to LDIF

Backup to LDIF is performed at the suffix level. The output of a backup to LDIF is a formatted LDIF file, which is a copy of the data contained in the suffix. As such, this process takes longer than a binary backup.

Backup to LDIF is performed using one of the following commands:


Note –

Replication information is backed up unless you use the -Q option when running these commands.

The dse.ldif configuration file is not backed up in a backup to LDIF. To enable you to restore a previous configuration, back this file up manually.


Backup to LDIF has the following advantages:

Backup to LDIF has one limitation. In situations where rapid backup and restoration are required, backup to LDIF might take too long to be viable.

You need to perform a regular backup by using backup to LDIF for each replicated suffix, on a single master in your topology.

In the following figure, dsadm export is performed for each replicated suffix, on one master only (M1).

Figure 8–3 Offline Backup to LDIF

Backup using dsadm export

For information about how to use the backup to LDIF commands, see Backing Up to LDIF in Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide.

Choosing a Restoration Method

Directory Server Enterprise Edition provides two methods of restoring data: binary restore and restoration from an LDIF file. As with the backup methods, both of these methods have advantages and limitations.

Binary Restore

Binary restore copies data at the database level. Binary restore is performed using one of the following commands:

Binary restore has the following advantages:

Binary restore has the following limitations:

Binary restore is the preferred restoration method if the machines have an identical configuration and time is a major consideration.

The following figure assumes that M1 and M2 have an identical configuration and that M3 and M4 have an identical configuration. In this scenario, M1 or M2 can be restored from the binary backup of M1 (db1). M3 or M4 can be restored from the binary backup of M3 (db2).

Figure 8–4 Offline Binary Restore

Binary restore from two separate databases to two separate
servers

Restoration From LDIF

Restoration from an LDIF file is performed at the suffix level. As such, this process takes longer than a binary restore. Restoration from LDIF can be performed using one of the following commands:

Restoration from an LDIF file has the following advantages:

Restoration from an LDIF file has one limitation. In situations where rapid restoration is required, this method might take too long to be viable. For more information about restoring data from an LDIF file, see Importing Data From an LDIF File in Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide.

In the following figure, dsadmin import is performed for each replicated suffix, on one master only (M1).

Figure 8–5 Offline Restoration From LDIF

Offline restore from and LDIF file, using dsadm import