Bacula – notes on upgrading to 1.38.5

Today I ran a test upgrade of my Bacula installation. I went from 1.36.3 to 1.38.5. After running the database upgrade script, which creates new columns and a few new tables, I noticed that I needed to set some permissions.

grant all on device to group bacula;
grant all on device_deviceid_seq to group bacula;
grant all on mediatype to group bacula;
grant all on mediatype_mediatypeid_seq to group bacula;
grant all on status to group bacula;
grant all on storage to group bacula;
grant all on storage_storageid_seq to group bacula;

After that, all ran fine.

The database upgrade script ran like this (it can take several minutes to run):

[dan@polo:/usr/local/share/bacula] $ sh ./update_postgresql_tables

This script will update a Bacula PostgreSQL database from version 8 to 9
Depending on the size of your database,
this script may take several minutes to run.

ALTER TABLE
UPDATE 70
ALTER TABLE
ALTER TABLE
UPDATE 70
ALTER TABLE
UPDATE 1
ALTER TABLE
ALTER TABLE
UPDATE 1
ALTER TABLE
UPDATE 1
ALTER TABLE
UPDATE 1
ALTER TABLE
UPDATE 1
ALTER TABLE
UPDATE 2646
ALTER TABLE
UPDATE 2646
ALTER TABLE
UPDATE 70
ALTER TABLE
psql:<stdin>:36: NOTICE: CREATE TABLE will create implicit sequence "mediatype_mediatypeid_seq" for "serial" column "mediatype.mediatypeid"
psql:<stdin<:36: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "mediatype_pkey" for table "mediatype"
CREATE TABLE
psql:<stdin<:55: NOTICE: CREATE TABLE will create implicit sequence "device_deviceid_seq" for "serial" column "device.deviceid"
psql:<stdin<:55: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "device_pkey" for table "device"
CREATE TABLE
psql:<stdin<:62: NOTICE: CREATE TABLE will create implicit sequence "storage_storageid_seq" for "serial" column "storage.storageid"
psql:<stdin<:62: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "storage_pkey" for table "storage"
CREATE TABLE
psql:<stdin<:68: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "status_pkey" for table "status"
CREATE TABLE
INSERT 129966468 1
INSERT 129966469 1
INSERT 129966470 1
INSERT 129966471 1
INSERT 129966472 1
INSERT 129966473 1
INSERT 129966474 1
INSERT 129966475 1
INSERT 129966476 1
INSERT 129966477 1
INSERT 129966478 1
INSERT 129966479 1
INSERT 129966480 1
INSERT 129966481 1
INSERT 129966482 1
INSERT 129966483 1
INSERT 129966484 1
INSERT 129966485 1
INSERT 129966486 1
DELETE 1
INSERT 129966487 1
VACUUM
Update of Bacula PostgreSQL tables succeeded.

The errors I saw upon startup, and which prompted the permission changes listed above, were:

$ sudo /usr/local/etc/rc.d/z-bacula.sh start
Password:
Starting the Bacula Storage daemon
Starting the Bacula File daemon
Starting the Bacula Director daemon
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:331 sql_create.c:331 query SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File' failed:
ERROR: permission denied for relation mediatype

21-Jan 15:21 bacula-dir: sql_create.c:331 SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File'
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:349 sql_create.c:349 insert INSERT INTO MediaType (MediaType,ReadOnly) VALUES ('File',0) failed:
ERROR: permission denied for relation mediatype

21-Jan 15:21 bacula-dir: sql_create.c:349 INSERT INTO MediaType (MediaType,ReadOnly) VALUES ('File',0)
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:273 sql_create.c:273 query SELECT StorageId,AutoChanger FROM Storage WHERE Name='File' failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_create.c:273 SELECT StorageId,AutoChanger FROM Storage WHERE Name='File'
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:301 sql_create.c:301 insert INSERT INTO Storage (Name,AutoChanger) VALUES ('File',0) failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_create.c:301 INSERT INTO Storage (Name,AutoChanger) VALUES ('File',0)
21-Jan 15:21 bacula-dir: Error: sql_create.c:303 Create DB Storage record INSERT INTO Storage (Name,AutoChanger) VALUES ('File',0) failed. ERR=ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: Error: sql_update.c:270 sql_update.c:270 update UPDATE Storage SET AutoChanger=0 WHERE StorageId=0 failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_update.c:270 UPDATE Storage SET AutoChanger=0 WHERE StorageId=0
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:331 sql_create.c:331 query SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File' failed:
ERROR: permission denied for relation mediatype

21-Jan 15:21 bacula-dir: sql_create.c:331 SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File'
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:349 sql_create.c:349 insert INSERT INTO MediaType (MediaType,ReadOnly) VALUES ('File',0) failed:
ERROR: permission denied for relation mediatype

21-Jan 15:21 bacula-dir: sql_create.c:349 INSERT INTO MediaType (MediaType,ReadOnly) VALUES ('File',0)
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:273 sql_create.c:273 query SELECT StorageId,AutoChanger FROM Storage WHERE Name='FileRemote' failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_create.c:273 SELECT StorageId,AutoChanger FROM Storage WHERE Name='FileRemote'
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:301 sql_create.c:301 insert INSERT INTO Storage (Name,AutoChanger) VALUES ('FileRemote',0) failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_create.c:301 INSERT INTO Storage (Name,AutoChanger) VALUES ('FileRemote',0)
21-Jan 15:21 bacula-dir: Error: sql_create.c:303 Create DB Storage record INSERT INTO Storage (Name,AutoChanger) VALUES ('FileRemote',0) failed. ERR=ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: Error: sql_update.c:270 sql_update.c:270 update UPDATE Storage SET AutoChanger=0 WHERE StorageId=0 failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_update.c:270 UPDATE Storage SET AutoChanger=0 WHERE StorageId=0
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:331 sql_create.c:331 query SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='DLT' failed:
ERROR: permission denied for relation mediatype

21-Jan 15:21 bacula-dir: sql_create.c:331 SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='DLT'
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:349 sql_create.c:349 insert INSERT INTO MediaType (MediaType,ReadOnly) VALUES ('DLT',0) failed:
ERROR: permission denied for relation mediatype

21-Jan 15:21 bacula-dir: sql_create.c:349 INSERT INTO MediaType (MediaType,ReadOnly) VALUES ('DLT',0)
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:273 sql_create.c:273 query SELECT StorageId,AutoChanger FROM Storage WHERE Name='DLT' failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_create.c:273 SELECT StorageId,AutoChanger FROM Storage WHERE Name='DLT'
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:301 sql_create.c:301 insert INSERT INTO Storage (Name,AutoChanger) VALUES ('DLT',0) failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_create.c:301 INSERT INTO Storage (Name,AutoChanger) VALUES ('DLT',0)
21-Jan 15:21 bacula-dir: Error: sql_create.c:303 Create DB Storage record INSERT INTO Storage (Name,AutoChanger) VALUES ('DLT',0) failed. ERR=ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: Error: sql_update.c:270 sql_update.c:270 update UPDATE Storage SET AutoChanger=0 WHERE StorageId=0 failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_update.c:270 UPDATE Storage SET AutoChanger=0 WHERE StorageId=0
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:331 sql_create.c:331 query SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='DLT' failed:
ERROR: permission denied for relation mediatype

21-Jan 15:21 bacula-dir: sql_create.c:331 SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='DLT'
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:349 sql_create.c:349 insert INSERT INTO MediaType (MediaType,ReadOnly) VALUES ('DLT',0) failed:
ERROR: permission denied for relation mediatype

21-Jan 15:21 bacula-dir: sql_create.c:349 INSERT INTO MediaType (MediaType,ReadOnly) VALUES ('DLT',0)
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:273 sql_create.c:273 query SELECT StorageId,AutoChanger FROM Storage WHERE Name='DLTRemote' failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_create.c:273 SELECT StorageId,AutoChanger FROM Storage WHERE Name='DLTRemote'
21-Jan 15:21 bacula-dir: Fatal error: sql_create.c:301 sql_create.c:301 insert INSERT INTO Storage (Name,AutoChanger) VALUES ('DLTRemote',0) failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_create.c:301 INSERT INTO Storage (Name,AutoChanger) VALUES ('DLTRemote',0)
21-Jan 15:21 bacula-dir: Error: sql_create.c:303 Create DB Storage record INSERT INTO Storage (Name,AutoChanger) VALUES ('DLTRemote',0) failed. ERR=ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: Error: sql_update.c:270 sql_update.c:270 update UPDATE Storage SET AutoChanger=0 WHERE StorageId=0 failed:
ERROR: permission denied for relation storage

21-Jan 15:21 bacula-dir: sql_update.c:270 UPDATE Storage SET AutoChanger=0 WHERE StorageId=0
[dan@bast:/usr/local/share/bacula] $

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top