Bug 1447015
Summary: | Adjust db2bak.pl help and man page to reflect changes introduced to the script | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Simon Reber <sreber> |
Component: | 389-ds-base | Assignee: | mreynolds |
Status: | CLOSED ERRATA | QA Contact: | Viktor Ashirov <vashirov> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | amsharma, lmiksik, nkinder, rmeggins, roman.aleksic |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 389-ds-base-1.3.6.1-16.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 21:16:38 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Simon Reber
2017-05-01 07:24:42 UTC
The man page and script usage needs to be updated to express this behavior Upstream ticket: https://pagure.io/389-ds-base/issue/49241 This needs some minor fixes - 1). Commit message fix -> https://pagure.io/389-ds-base/c/470a30c - commit message = * state thtthe backup * 2). Synopsis in man page need correction, it still says backupdir for -a and -A NAME db2bak.pl - Directory Server perl script for creating a backup SYNOPSIS db2bak.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j filename } [-t dbtype] [-a backupdir] [-A backupdir] [-P protocol] [-h] 3). This is correct -a backupdir The directory where the backup should be stored. This directory is a symbolic link to the actual backup files located under "nsslapd-bakdir" directory that is set in the "cn=config" entry. -A backupdir This is similar to -a, except that a sub-directory of backupdir will be created for the backup, and the name of the sub- directory will be a timestamp of the form server-instance-date_time. 4). we removed -v option? I can still see the option in help though but it does not work. [0 root@qeos-41 /]# db2bak.pl -v -D "cn=Directory Manager" -w Secret123 -a "/export/backup/data.ldif" ERROR - Unknown option: -v Usage: db2bak.pl [-v] [-Z serverID] [-D rootdn] { -w password | -w - | -j filename } [-a backupdir] [-t dbtype] [-P protocol] [-h] 5). Can we change the output here as "symbolic link to backup directory" instead of just "Back up directory" [0 root@qeos-41 /]# db2bak.pl -D "cn=Directory Manager" -w Secret123 -a "/export/backup/data.ldif" Back up directory: /export/backup/data.ldif Successfully added task entry "cn=backup_2017_5_17_4_38_34, cn=backup, cn=tasks, cn=config" 6). This works fine nsslapd-bakdir: /var/lib/dirsrv/slapd-qeos-41/bak [0 root@qeos-41 /]# cd /export/backup/ [0 root@qeos-41 backup]# ls -al total 8 drwxr-xr-x. 2 root root 4096 May 17 04:38 . drwxr-xr-x. 5 dirsrv dirsrv 4096 May 17 03:52 .. lrwxrwxrwx. 1 root root 43 May 17 04:38 data.ldif -> /var/lib/dirsrv/slapd-qeos-41/bak/data.ldif Thanks. (In reply to Amita Sharma from comment #5) > This needs some minor fixes - > > 1). Commit message fix -> https://pagure.io/389-ds-base/c/470a30c - commit > message = * state thtthe backup * > > 2). Synopsis in man page need correction, it still says backupdir for -a and > -A I think this should not change - that's what the option description is for - to describe what it does. I just think it might be confusing if we change: backupdir to symbackupdir. > > NAME > db2bak.pl - Directory Server perl script for creating a backup > > SYNOPSIS > db2bak.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j > filename } [-t dbtype] [-a backupdir] [-A backupdir] [-P protocol] > [-h] > > 3). This is correct > -a backupdir > The directory where the backup should be stored. This > directory is a symbolic link to the actual backup files located > under "nsslapd-bakdir" directory that is set in the > "cn=config" entry. > > -A backupdir > This is similar to -a, except that a sub-directory of > backupdir will be created for the backup, and the name of the sub- > directory will be a timestamp of the form > server-instance-date_time. > > 4). we removed -v option? I can still see the option in help though but it > does not work. > [0 root@qeos-41 /]# db2bak.pl -v -D "cn=Directory Manager" -w Secret123 -a > "/export/backup/data.ldif" > ERROR - Unknown option: -v > Usage: db2bak.pl [-v] [-Z serverID] [-D rootdn] { -w password | -w - | -j > filename } [-a backupdir] > [-t dbtype] [-P protocol] [-h] > > 5). Can we change the output here as "symbolic link to backup directory" > instead of just "Back up directory" I'm proposing this approach in my patch: # db2bak.pl -w password -D cn=dm -a /tmp/mark Back up directory: /tmp/mark -> /var/lib/dirsrv/slapd-localhost/bak/mark ... > [0 root@qeos-41 /]# db2bak.pl -D "cn=Directory Manager" -w Secret123 -a > "/export/backup/data.ldif" > Back up directory: /export/backup/data.ldif > Successfully added task entry "cn=backup_2017_5_17_4_38_34, cn=backup, > cn=tasks, cn=config" > > 6). This works fine > nsslapd-bakdir: /var/lib/dirsrv/slapd-qeos-41/bak > [0 root@qeos-41 /]# cd /export/backup/ > [0 root@qeos-41 backup]# ls -al > total 8 > drwxr-xr-x. 2 root root 4096 May 17 04:38 . > drwxr-xr-x. 5 dirsrv dirsrv 4096 May 17 03:52 .. > lrwxrwxrwx. 1 root root 43 May 17 04:38 data.ldif -> > /var/lib/dirsrv/slapd-qeos-41/bak/data.ldif > > Thanks. (In reply to mreynolds from comment #6) > (In reply to Amita Sharma from comment #5) > > This needs some minor fixes - > > > > 1). Commit message fix -> https://pagure.io/389-ds-base/c/470a30c - commit > > message = * state thtthe backup * > > > > 2). Synopsis in man page need correction, it still says backupdir for -a and > > -A > > I think this should not change - that's what the option description is for - > to describe what it does. I just think it might be confusing if we change: > backupdir to symbackupdir. Ok. > > > > > > NAME > > db2bak.pl - Directory Server perl script for creating a backup > > > > SYNOPSIS > > db2bak.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j > > filename } [-t dbtype] [-a backupdir] [-A backupdir] [-P protocol] > > [-h] > > > > 3). This is correct > > -a backupdir > > The directory where the backup should be stored. This > > directory is a symbolic link to the actual backup files located > > under "nsslapd-bakdir" directory that is set in the > > "cn=config" entry. > > > > -A backupdir > > This is similar to -a, except that a sub-directory of > > backupdir will be created for the backup, and the name of the sub- > > directory will be a timestamp of the form > > server-instance-date_time. > > > > 4). we removed -v option? I can still see the option in help though but it > > does not work. > > [0 root@qeos-41 /]# db2bak.pl -v -D "cn=Directory Manager" -w Secret123 -a > > "/export/backup/data.ldif" > > ERROR - Unknown option: -v > > Usage: db2bak.pl [-v] [-Z serverID] [-D rootdn] { -w password | -w - | -j > > filename } [-a backupdir] > > [-t dbtype] [-P protocol] [-h] > > > > 5). Can we change the output here as "symbolic link to backup directory" > > instead of just "Back up directory" > > I'm proposing this approach in my patch: > > # db2bak.pl -w password -D cn=dm -a /tmp/mark > Back up directory: /tmp/mark -> /var/lib/dirsrv/slapd-localhost/bak/mark > ... Even better, Sounds good to me, . > > > [0 root@qeos-41 /]# db2bak.pl -D "cn=Directory Manager" -w Secret123 -a > > "/export/backup/data.ldif" > > Back up directory: /export/backup/data.ldif > > Successfully added task entry "cn=backup_2017_5_17_4_38_34, cn=backup, > > cn=tasks, cn=config" > > > > 6). This works fine > > nsslapd-bakdir: /var/lib/dirsrv/slapd-qeos-41/bak > > [0 root@qeos-41 /]# cd /export/backup/ > > [0 root@qeos-41 backup]# ls -al > > total 8 > > drwxr-xr-x. 2 root root 4096 May 17 04:38 . > > drwxr-xr-x. 5 dirsrv dirsrv 4096 May 17 03:52 .. > > lrwxrwxrwx. 1 root root 43 May 17 04:38 data.ldif -> > > /var/lib/dirsrv/slapd-qeos-41/bak/data.ldif > > > > Thanks. Thanks. Thanks Amita, fixed upstream [root@qeos-213 upstream]# db2bak.pl -v -D "cn=Directory Manager" -w Secret123 -a "/export/backup/data.ldif" ERROR - Unknown option: -v Usage: db2bak.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j filename } [-a backupdir] [-t dbtype] [-P protocol] [-h] Options: -D rootdn - Directory Manager -w password - Directory Manager's password -w - - Prompt for Directory Manager's password -Z serverID - Server instance identifier -j filename - Read Directory Manager's password from file -A backupdir - Backup directory symlink(backupdir/ID-<date_time>) -a backupdir - Backup directory symlink -t dbtype - Database type (default: ldbm database) -P protocol - STARTTLS, LDAPS, LDAPI, LDAP (default: uses most secure protocol available) -h - Display usage --------------------------- [root@qeos-213 backup2]# db2bak.pl -D "cn=Directory Manager" -w Secret123 -a "/export/backup2/data.ldif" Back up directory: /export/backup2/data.ldif -> /var/lib/dirsrv/slapd-qeos-213/bak/data.ldif Successfully added task entry "cn=backup_2017_6_12_7_13_18, cn=backup, cn=tasks, cn=config" [root@qeos-213 backup2]# ls -al total 0 drwxr-xr-x. 2 dirsrv dirsrv 40 Jun 12 07:13 . drwxr-xr-x. 7 dirsrv dirsrv 101 Jun 12 06:48 .. -rw-r--r--. 1 root root 0 Jun 12 07:12 data,ldif lrwxrwxrwx. 1 root root 44 Jun 12 07:13 data.ldif -> /var/lib/dirsrv/slapd-qeos-213/bak/data.ldif Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2086 |