Chapter 4. Populating Directory Databases

cd /usr/lib/dirsrv/slapd-instance_name

2.Run the bak2db.pl Perl script.

bak2db.pl -D "cn=Directory Manager" -w secret -a

/var/lib/dirsrv/slapd-instance_name/bak/instance_name-2007_04_30_11_48_30

For more information on using this Perl script, see the Directory Server Configuration, Command, and File Reference.

Option

-a

-D

-w

Description

Defines the full path and name of the input file.

Specifies the DN of the administrative user.

Specifies the password of the administrative user.

3.4. Restoring a Single Database

It is possible to restore a single database through the command-line, but not in the Directory Server Console. To restore a single database, do the following:

1.Stop the Directory Server if it is running.2

service dirsrv stop instance

2.Restore the backend from the /var/lib/dirsrv/slapd-instance_name/bakarchives with the bak2db script, using the -nparameter to specify the database name. For example:

bak2db /var/lib/dirsrv/slapd-instance_name/bak/backup_file-n userRoot

3.Restart the Directory Server.

service dirsrv start instance

NOTE

128

Page 148
Image 148
HP UX Red Hat Direry Server Software manual Restoring a Single Database, Run the bak2db.pl Perl script