Q. How can I backup Fedora / CentOS / Redhat Linux Directory server database?
A. You can back up your databases from the command-line using the db2bak command-line script. This script works when the server is running or when the server is stopped. Run script as follows:
The db2back script will create a backup folder with a format of year_month_day__hour (YYYY_MM_DD_hh_mm_ss). The backup folder will contain the exported LDIF files and other Berkeley databases (.db4 files).
First stop server:
Next restore the backup database. For example:
Again start the Red Hat Directory Server: