Bug 1310925 - rhds10 doc admin guide - incorrect db2bak.pl example
rhds10 doc admin guide - incorrect db2bak.pl example
Status: CLOSED CURRENTRELEASE
Product: Red Hat Directory Server
Classification: Red Hat
Component: Doc-administration-guide (Show other bugs)
10.0
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Petr Bokoc
Viktor Ashirov
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-22 19:39 EST by Marc Sauton
Modified: 2016-06-15 08:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-15 08:38:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marc Sauton 2016-02-22 19:39:35 EST
Description of problem:

broken example of db2bak.pl in the RHDS 10 admin guide
in
https://access.redhat.com/documentation/en-US/Red_Hat_Directory_Server/10/html/Administration_Guide/Populating_Directory_Databases-Backing_Up_and_Restoring_Data.html
chapter
4.3.1.2. Backing up All Databases from the Command Line

it says
"
[root@server ~]# /usr/lib64/dirsrv/slapd-example/db2bak.pl /var/lib/dirsrv/slapd-instance/bak/instance-2015_04_30_16_27_56
"

which does not work and confuse customers

if the intent is to show a task use while the server is running, it should be like this example:

"
[root@server ~]# /usr/lib64/dirsrv/slapd-example/db2bak.pl -D "cn=Directory Manager" -w - -a /var/lib/dirsrv/slapd-instance/bak/instance-2015_04_30_16_27_5-custom-name
"


and add an extra note about the path when specifying the -A option (or should this note go into a kb article?):

Note: When using the -A option, do not provide a trailing slash to the destination directory if only indicating the nsslapd-bakdir directory, there will be an error otherwise.
this will fail
/usr/lib64/dirsrv/slapd-m2/db2bak.pl -D "cn=Directory Manager" -w password -a /var/lib/dirsrv/slapd-m2/bak/
but this will work
/usr/lib64/dirsrv/slapd-m2/db2bak.pl -D "cn=Directory Manager" -w password -a /var/lib/dirsrv/slapd-m2/bak
and this will work
/usr/lib64/dirsrv/slapd-m2/db2bak.pl -D "cn=Directory Manager" -w password -a /var/lib/dirsrv/slapd-m2/bak/m2-test/
as well as this form:
/usr/lib64/dirsrv/slapd-m2/db2bak.pl -D "cn=Directory Manager" -w password -a /var/lib/dirsrv/slapd-m2/bak/m2-test


I am providing 2 examples here, not sure if this should go into the admin guide:

broken db2bak.pl example with the -A option:
"
/usr/lib64/dirsrv/slapd-m2/db2bak.pl -D "cn=Directory Manager" -w password -A /var/lib/dirsrv/slapd-m2/bak/
Back up directory: /var/lib/dirsrv/slapd-m2/bak//m2-2016_2_22_16_28_27
Successfully added task entry "cn=backup_2016_2_22_16_28_27, cn=backup, cn=tasks, cn=config"
[root@m2 ~]# 

and in the /var/log/dirsrv/slapd-m2/errors log file:
[22/Feb/2016:16:28:26 -0800] - Beginning backup of 'ldbm database'
[22/Feb/2016:16:28:26 -0800] - mkdir_p /var/lib/dirsrv/slapd-m2/bak/m2-2016_2_22_16_28_27: error -5943 (Cannot create or rename a filename that already exists.)
[22/Feb/2016:16:28:26 -0800] - Can't create new directory /var/lib/dirsrv/slapd-m2/bak/m2-2016_2_22_16_28_27/userRoot, Netscape Portable Runtime error -5943 (Cannot create or rename a filename that already exists.)
[22/Feb/2016:16:28:26 -0800] - Backup: error in copying directory (/var/lib/dirsrv/slapd-m2/db/userRoot -> /var/lib/dirsrv/slapd-m2/bak/m2-2016_2_22_16_28_27): err=-1
[22/Feb/2016:16:28:27 -0800] - Backup finished.

"

good db2bak.pl example with the -A option:
"
/usr/lib64/dirsrv/slapd-m2/db2bak.pl -D "cn=Directory Manager" -w password -A /var/lib/dirsrv/slapd-m2/bak
Back up directory: /var/lib/dirsrv/slapd-m2/bak/m2-2016_2_22_16_29_45
Successfully added task entry "cn=backup_2016_2_22_16_29_45, cn=backup, cn=tasks, cn=config"
"
and the task completes with a success.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Note You need to log in before you can comment on or make changes to this bug.