You can restore data by using the restore utility. The restore utility allows you to restore only one back end at a time. The directory server must be stopped prior to a restore, unless you are scheduling a restore task, or you are restoring data that has been signed or hashed.
$ restore --listBackups --backupDirectory backup/userRoot Backup ID: 20080827153501Z Backup Date: 27/Aug/2008:10:35:11 -0500 Is Incremental: false Is Compressed: true Is Encrypted: false Has Unsigned Hash: false Has Signed Hash: false Dependent Upon: none
$ restore --backupDirectory backup/userRoot
Typically, system administrators run a weekly full backup with daily incremental backups. Be aware that it takes longer to restore your system from incremental backups.
Each back end must be restored individually.
Restore each incremental backup starting from the last full backup.
The directory server provides a task back end for processing administrative tasks, such as backups and restores. You can specify the start time for a restore by using the -t or --start option. If one of these options is provided, the utility exits immediately after scheduling the task. To schedule a task for immediate execution and have the utility exit immediately after scheduling the task, specify 0 as the value for the start time. If the -t or --start option is omitted, the utility schedules the task for immediate execution and tracks the task's progress, printing log messages as they are available and exiting when the task has completed.
Access to the task back end is provided over SSL, using the administration connector. If you schedule the restore as a task, you must therefore specify how the SSL certificate will be trusted.
The following command restores the userRoot back end at a scheduled start time by using the --start option. The restore sends a completion and error notification to email@example.com. The -X option specifies that all certificates presented by the server are trusted.
$ restore -p 4444 -D "cn=Directory Manager" -w password -X \ -d /backup/userRoot --start 20080125121500 --completionNotify firstname.lastname@example.org \ --errorNotify email@example.com
For more information, see Configuring Commands As Tasks.
You might need to restore the configuration file to transfer the configuration to another server, for disaster recovery purposes, or for other events. In general, if a server is online, the current configuration file is equivalent to the latest archived configuration file. However, you can choose to restore the config.ldif file from a previous date.
$ ls install-dir/config/archived-configs ./ ../ config-20070817192057Z.gz config-20070827153200Z.gz config-20070817192052Z.gz config-20070827153214Z-2.gz
$ cp config-20070817182052Z install-dir/config/config.ldif
The config.ldif file should reside in this directory. The saved schema subdirectory should be located in install-dir/config/schema.