Bacula-users

[Bacula-users] Errors with 5.0.0 backup catalog

2010-01-25 21:06:38
Subject: [Bacula-users] Errors with 5.0.0 backup catalog
From: Dan Langille <dan AT langille DOT org>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 25 Jan 2010 20:41:43 -0500
This is for the record.

While creating the FreeBSD package for 5.0.0, I noticed a few new things 
to be aware of.

With 5.0.0 comes a new backup catalog script.  It parses the 
bacula-dir.conf file and extracts what it needs from that.  This means 
you only need to specify the database connection information in one 
place and it is not passed to a script via the command line.

If you see this error while running that script:

25-Jan 16:37 ducky.unixathome.org-dir JobId 32500: shell command: run
BeforeJob "/usr/local/share/bacula/make_catalog_backup.pl MyCatalog"
25-Jan 16:37 ducky.unixathome.org-dir JobId 32500: BeforeJob: Can't get
catalog information  at /usr/local/share/bacula/make_catalog_backup.pl
line 129.
25-Jan 16:37 ducky.unixathome.org-dir JobId 32500: Error: Runscript:
BeforeJob returned non-zero status=13. ERR=Child exited with code 13
25-Jan 16:37 ducky.unixathome.org-dir JobId 32500: Error: Bacula
ducky.unixathome.org-dir 5.0.0 (26Jan10): 25-Jan-2010 16:37:10


Then I suspect the permissions on make_catalog_backup.pl are 
insufficient for Bacula to run it.  I made mine chown bacula:bacula and 
chmod 744:

-rwxr-xr--  1 bacula  bacula  4120 Jan 25 17:10 make_catalog_backup.pl



If you see this error:

25-Jan 16:44 ducky.unixathome.org-dir JobId 32502: shell command: run
BeforeJob "/usr/local/share/bacula/make_catalog_backup.pl MyCatalog"
25-Jan 16:44 ducky.unixathome.org-dir JobId 32502: BeforeJob: Can't find
your catalog (MyCatalog) in director configuration
25-Jan 16:44 ducky.unixathome.org-dir JobId 32502: Error: Runscript:
BeforeJob returned non-zero status=1. ERR=Child exited with code 1

Then chances are the permissions on bacula-dir.conf or dbcheck are 
insufficient.  Make sure this command works:

# su -m bacula -c '/usr/local/sbin/dbcheck -B -c 
/usr/local/etc/bacula-dir.conf'
catalog=MyCatalog
db_name=bacula
db_driver=
db_user=bacula
db_password=
db_address=
db_port=0
db_socket=
db_type=PostgreSQL
working_dir=/var/db/bacula

If you get: /usr/local/sbin/dbcheck: Permission denied.

Make sure bacula is allowed to run dbcheck.  I use this:

-rwxr-xr--  1 root  bacula  100225 Jan 25 17:12 dbcheck

If you get this, check the permissions on bacula-dir.conf:

26-Jan 01:37 dbcheck: ERROR TERMINATION at parse_conf.c:898
Config error: Cannot open config file "/usr/local/etc/bacula-dir.conf": 
Permission denied

I use this:


-rw-r-----  1 root  bacula  9095 Jan 25 17:16 bacula-dir.conf

Finally, to be sure, run this command:

su -m bacula -c '/usr/local/share/bacula/make_catalog_backup.pl MyCatalog'

and if that runs fine, Bacula should be able to run it.


Also, if during the backup, you see permission errors on pathhierarchy 
or pathvisibility then the database upgrade wasn't run as the correct 
user.  You may have to adjust the owner of the database to match that of 
the other tables.


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] Errors with 5.0.0 backup catalog, Dan Langille <=