Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 233027 - make & user more user-friendly
Summary: make & user more user-friendly
Alias: None
Product: 389
Classification: Retired
Component: Command Line Utilities
Version: 1.0.4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
Depends On:
Blocks: FDS1.1.0
TreeView+ depends on / blocked
Reported: 2007-03-19 22:34 UTC by Noriko Hosoi
Modified: 2015-12-07 16:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-12-07 16:39:25 UTC

Attachments (Terms of Use)
cvs diff (deleted)
2007-03-19 22:41 UTC, Noriko Hosoi
no flags Details | Diff
cvs commit message (deleted)
2007-03-19 23:02 UTC, Noriko Hosoi
no flags Details
cvs diff,, (deleted)
2007-03-20 00:39 UTC, Noriko Hosoi
no flags Details | Diff
cvs commit message (deleted)
2007-03-20 01:16 UTC, Noriko Hosoi
no flags Details
cvs diff (deleted)
2007-03-23 02:10 UTC, Noriko Hosoi
no flags Details | Diff
cvs diff and its commit message (deleted)
2007-03-24 00:52 UTC, Noriko Hosoi
no flags Details
cvs commit message (deleted)
2007-03-29 22:27 UTC, Noriko Hosoi
no flags Details

Description Noriko Hosoi 2007-03-19 22:34:46 UTC
Description of problem:
[background info]
> Both and do not say much about where they are backing up
or exporting.
> ./ -D "cn=Directory Manager" -w <pw> -n userRoot`
> adding new entry cn=export_2007_3_19_11_1_38, cn=export, cn=tasks, cn=config
> ./ -D 'cn=Directory Manager' -w <pw>
> adding new entry cn=backup_2007_3_19_11_14_51, cn=backup, cn=tasks, cn=config
> Isn't it nicer the perl scripts prints out something like "exporting to
<fullpath>/<ldiffilename>" or "backing up to <backup_dir>" if it's not too noisy?
Yes, they should print something like that.
> Maybe, we'd better add "backend name" to the path as well?  E.g.,

[Fix proposal]
./ -D 'cn=Directory Manager' -w <pw>
Back up directory: /opt/fedora-ds/slapd-laputa/bak/2007_3_19_14_18_17
adding new entry cn=backup_2007_3_19_14_18_17, cn=backup, cn=tasks, cn=config
1) if suffixes are given, the first rdn values are added to the ldif file name
following the server id separated by '-'s.
./ -D 'cn=Directory Manager' -w <pw> -s dc=example,dc=com -s
Exported ldif file:
adding new entry cn=export_2007_3_19_14_18_7, cn=export, cn=tasks, cn=config

2) if backend instance names are given, the instance names are added to the ldif
file name following the server id separated by '-'s.
./ -D 'cn=Directory Manager' -w Secret123 -n userRoot -n netscapeRoot
Exported ldif file:
adding new entry cn=export_2007_3_19_14_18_14, cn=export, cn=tasks, cn=config

note: if '-a' options are given to the both utilities, the specified path is
used for the back up dir/ldif file.

Comment 1 Noriko Hosoi 2007-03-19 22:41:48 UTC
Created attachment 150442 [details]
cvs diff


Changes: print out the back up directory
   Back up directory: ... print out the exported ldif file name
   Exported ldif file: ...
   The ldif file name format: <server id>-[<backend>}<first suffix

Comment 2 Noriko Hosoi 2007-03-19 22:44:19 UTC
We may want to mention this ldif file name change in the doc...?

Comment 3 Noriko Hosoi 2007-03-19 23:02:26 UTC
Created attachment 150443 [details]
cvs commit message

Reviewed by Rich (Thank you!)

Checked in into HEAD.

Comment 4 Noriko Hosoi 2007-03-20 00:39:47 UTC
Created attachment 150447 [details]
cvs diff,,


1) Found db2bak,, and db2ldif do not backup/export into the dir/file
which do not start with the <server-id> string. It could cause the difficulty
to find out which server instance does the backup/exported file belongs to. 
Also, to make them consistent with, added the "server id" string to
the back up dir name/exported ldif file name.
2) db2ldif[.pl] takes -M option.  With the -M option, the server adds backend
name to the ldif file name.  To reduce the redundancy, stopped adding the
backend name if -M is set.
3) made the ldif file name db2ldif generates consistent with the one

Comment 5 Noriko Hosoi 2007-03-20 01:16:30 UTC
Created attachment 150451 [details]
cvs commit message

Thanks again for reviewing the changes, Rich.

Checked in into HEAD.

Comment 8 Noriko Hosoi 2007-03-23 02:10:02 UTC
Created attachment 150717 [details]
cvs diff

File: ldap/admin/src/scripts/

Problem description: the command line fails to generate an output file name
when an empty suffix is passed as follows:
db2ldif -s ""

Changes: check if the suffix is empty or not.  If it is empty, generates an
output file name without it.

Comment 9 Noriko Hosoi 2007-03-24 00:52:47 UTC
Created attachment 150813 [details]
cvs diff and its commit message

Reviewed by Rich (Thank you!)

Checked in a slightly revised version into HEAD (removed redundant variable

Comment 10 Noriko Hosoi 2007-03-29 21:36:15 UTC
There's one more change needed for 'db2ldif -s ""' work...

RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/,v
retrieving revision 1.7
diff -t -w -U4 -r1.7
--- 24 Mar 2007 00:51:11 -0000      1.7
+++ 29 Mar 2007 21:34:34 -0000
@@ -43,9 +43,11 @@
         elif [ "$1" = "-M" ]; then
+        if [ "$1" != "" ]; then
+        fi

     if [ "$be" = "" ]; then
         echo {{LDIF-DIR}}/{{SERV-ID}}-`date +%Y_%m_%d_%H%M%S`.ldif

Comment 11 Noriko Hosoi 2007-03-29 22:27:56 UTC
Created attachment 151242 [details]
cvs commit message

Reviewed by Nathan (Thank you!)

Checked in into HEAD.

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