Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide

Backing Up Directory Data Only

A binary data backup saves a copy of your directory data that you can use if the database files later become corrupted or deleted. This operation does not back up configuration data. If you want to back up the whole Directory Server for disaster recovery, see Disaster Recovery.

Caution – Caution –

Never stop the server during a backup operation.

Your backup must be performed more frequently than the purge delay. The purge delay, specified by the nsDS5ReplicaPurgeDelay attribute, is the period of time, in seconds, after which internal purge operations are performed on the change log. The default purge delay is 604800 seconds (1 week). The change log maintains a record of updates, which might or might not have been replicated.

If your backup is performed less frequently than the purge delay, the change log might be cleared before it has been backed up. Changes will therefore be lost if you use the backup to restore data.

All backup procedures described in this section store a copy of the server files on the same host by default. You should then copy and store your backups on a different machine or file system for greater security.

ProcedureTo Back Up Your Directory Data

Your Directory Server must be stopped to run the dsadm backup command.

You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.

  1. Back up your directory data.

    $ dsadm backup instance-path archive-dir

    For example:

    $ dsadm backup /local/ds /local/tmp/20051205

    Note –

    You can back up directory data while the server is running by using the command dsconf backup command. However, if changes are made to the directory data while the backup is running, proper recovery is more difficult. To avoid this problem when using dsconf backup, set replication referrals or make the server read-only.

    For more information about the dsadm and dsconf commands, see the dsadm(1M) and dsconf(1M) man pages.

ProcedureTo Back Up the dse.ldif File

When restoring a server, the dse.ldif configuration file must contain the same configuration information as when the server was backed up.

  1. Back up your dse.ldif configuration file.

    $ cp instance-path/config/dse.ldif archive-dir

    When you perform the following actions, Directory Server automatically backs up the dse.ldif configuration file in the directory instance-path/config.

    • When you start Directory Server, a backup of the dse.ldif file is created in a file named dse.ldif.startOK.

    • When you make modifications to the cn=config branch, the file is first backed up to a file named dse.ldif.bak in the config directory before the server writes the modifications to the dse.ldif file.