Restoring a backup
You can use the restore command to restore a backup created with the backup command.
About this task
You can only restore a single backend at a time, and that backend will be offline for the duration of the restore process. The directory containing the backup used for the restoration includes a backup.info file with information about the backup, including when the backup was generated and whether the backup is compressed, signed, or encrypted.
You can use the restore command for the following data recovery scenarios:
Steps
-
To restore a single backend in a replicated topology, run the
dsreplication initializecommand.This command streams the contents of the backend database from the source to the destination and ensures that the server receives the most up-to-date version of the data.
-
To restore a backup in a non-replicated instance, run the
restorecommand and specify the path to the directory containing the backup.Example:
$ bin/restore --backupDirectory /path/to/backup -
To restore a backup to a point-in-time:
-
Run
dsreplication pre-external-initializationon a server in the topology. -
Choose the required
baseDN. -
Stop the server.
-
Restore that server to your desired point-in-time backup.
-
Re-start the server.
-
Run
dsreplication initialize-all. -
Initialize all other servers in the topology from the restored server.
-
Run
dsreplication post-external-initializationon the restored server.
-
-
If all of your servers have been compromised:
-
Build a directory server.
-
Restore from the latest backup.
-
If available, use the
extract-data-recovery-log-changescommand to replay changes in the data recovery log.
For more information, see Reverting or replaying changes.
-
Add and initialize new directory servers from the one that you just restored.
-