Bug 728164

Summary: /usr/libexec/bacula/make_catalog_backup.pl fails with "/usr/sbin/dbcheck: invalid option -- 'B'"
Product: Red Hat Enterprise Linux 6 Reporter: Robert Scheck <redhat-bugzilla>
Component: baculaAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: robert.scheck, rprice
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-15 08:08:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Scheck 2011-08-04 09:00:00 UTC
Description of problem:
# /usr/libexec/bacula/make_catalog_backup.pl MyCatalog
/usr/sbin/dbcheck: invalid option -- 'B'
Copyright (C) 2001-2010 Free Software Foundation Europe e.V.

Version: 5.0.0 (26 January 2010)

Usage: bscan [ options ] <bacula-archive>
       -b bootstrap      specify a bootstrap file
       -c <file>         specify configuration file
       -d <nn>           set debug level to <nn>
       -dt               print timestamp in debug output
       -m                update media info in database
       -D <driver name>  specify the driver database name (default NULL)
       -n <name>         specify the database name (default bacula)
       -u <user>         specify database user name (default bacula)
       -P <password>     specify database password (default none)
       -h <host>         specify database host (default NULL)
       -t <port>         specify database port (default 0)
       -p                proceed inspite of I/O errors
       -r                list records
       -s                synchronize or store in database
       -S                show scan progress periodically
       -v                verbose
       -V <Volumes>      specify Volume names (separated by |)
       -w <dir>          specify working directory (default from conf file)
       -?                print this message

Can't find your catalog (MyCatalog) in director configuration
#

Version-Release number of selected component (if applicable):
bacula-director-common-5.0.0-7.el6.x86_64
bacula-client-5.0.0-7.el6.x86_64
bacula-common-5.0.0-7.el6.x86_64
bacula-director-sqlite-5.0.0-7.el6.x86_64
bacula-storage-common-5.0.0-7.el6.x86_64
bacula-console-5.0.0-7.el6.x86_64
bacula-storage-sqlite-5.0.0-7.el6.x86_64

How reproducible:
Everytime. Set up bacula and try to run the make_catalog_backup.pl.

Actual results:
/usr/libexec/bacula/make_catalog_backup.pl fails with "/usr/sbin/dbcheck: invalid option -- 'B'"

Expected results:
Working stuff as it does for example in EPEL 5 for RHEL 5.

Additional info:
I don't have any clue what option "-B" to should be, but "--help" doesn't
even display it. At the moment, this issue prevents bacula self-backup.

Comment 1 Robert Scheck 2011-08-04 09:01:53 UTC
I have cross-filed this issue as case 00514616 in the Red Hat customer portal.

Comment 3 RHEL Program Management 2011-08-04 09:17:56 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 4 Robert Scheck 2011-08-05 11:11:33 UTC
According to a phone call with the Red Hat support, somebody will work on
this problem nevertheless.

The default /etc/bacula/bacula-dir.conf as shipped with Red Hat Enterprise
Linux has a section like this:

  # This creates an ASCII copy of the catalog
  # Arguments to make_catalog_backup.pl are:
  #  make_catalog_backup.pl <catalog-name>
  RunBeforeJob = "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"

If you change the above section to the following like EPEL 5 for RHEL 5 is
using:

  # This creates an ASCII copy of the catalog
  RunBeforeJob = "/usr/libexec/bacula/make_catalog_backup bacula bacula"

I am getting a valid backup again. Nevertheless the perl script is broken,
it should not query /usr/sbin/dbcheck, but /usr/sbin/dbcheck.sqlite, which
provides the option "-B". Unfortunately, /usr/sbin/dbcheck expects a named
database driver (sqlite, mysql, postgresql) before it allows "-B" option.

If anybody is having the same problem: Please a) stress Red Hat as well and
b) be aware that the arguments for make_catalog_backup (the shell script)
might not be "bacula bacula" for your case, because they depend on what the
database connection data are.

Comment 5 Lukáš Nykrýn 2011-08-15 08:08:41 UTC
This problem is caused by incorrect symlinks and it will by corrected in bacula-5.0.0-8.el6.

*** This bug has been marked as a duplicate of bug 651787 ***