Backup CentOS or Redhat Directory Server Database (LDAP)

by on August 27, 2007 · 0 comments· LAST UPDATED August 27, 2007

in , ,

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:
# ./db2bak
OR
# /path/to/installed-directory/db2bak

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).

Restore backup

First stop server:
#./stop-slapd

Next restore the backup database. For example:
#./bak2db /path/to/bak/2007_02_02_01_02_12/

Again start the Red Hat Directory Server:
# ./start-nslapd

References:

=> Populating Directory Databases - Red Hat Directory Server

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , , , , , ,

Previous Faq:

Next Faq: