Bug 728164 - /usr/libexec/bacula/make_catalog_backup.pl fails with "/usr/sbin/dbcheck: invalid option -- 'B'"
Summary: /usr/libexec/bacula/make_catalog_backup.pl fails with "/usr/sbin/dbcheck: inv...
Status: CLOSED DUPLICATE of bug 651787
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bacula
Version: 6.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: qe-baseos-daemons
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-04 09:00 UTC by Robert Scheck
Modified: 2018-11-14 11:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-08-15 08:08:41 UTC
Target Upstream Version:

Attachments (Terms of Use)

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):

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

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

  # 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 ***

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