Backup catalog failed after upgrade from 13.2 to 14.2

286 views
Skip to first unread message

Edu Herraiz

unread,
Dec 19, 2014, 3:06:16 AM12/19/14
to bareos...@googlegroups.com
Our BackupCatalog Full Job fails after upgrade the bareos-director

19-Dec 06:12 apsl2-dir JobId 17471: shell command: run BeforeJob "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog"
19-Dec 06:12 apsl2-dir JobId 17471: BeforeJob: pg_dump: [archiver (db)] query failed: ERROR: permission denied for relation ndmpjobenvironment
19-Dec 06:12 apsl2-dir JobId 17471: BeforeJob: pg_dump: [archiver (db)] query was: LOCK TABLE public.ndmpjobenvironment IN ACCESS SHARE MODE
19-Dec 06:12 apsl2-dir JobId 17471: Error: Runscript: BeforeJob returned non-zero status=1. ERR=Child exited with code 1
19-Dec 06:12 apsl2-dir JobId 17471: Error: Bareos apsl2-dir 14.2.2 (12Dec14):

It seems a problem with the data migration, and the permissions in the new objects.

List of relations
Schema | Name | Type | Owner
--------+--------------------+-------+----------
public | basefiles | table | ubareos
public | client | table | ubareos
public | counters | table | ubareos
public | device | table | ubareos
public | devicestats | table | postgres
public | file | table | ubareos
public | filename | table | ubareos
public | fileset | table | ubareos
public | job | table | ubareos
public | jobhisto | table | ubareos
public | jobmedia | table | ubareos
public | jobstats | table | postgres
public | location | table | ubareos
public | locationlog | table | ubareos
public | log | table | ubareos
public | media | table | ubareos
public | mediatype | table | ubareos
public | ndmpjobenvironment | table | postgres
public | ndmplevelmap | table | ubareos
public | path | table | ubareos
public | pathhierarchy | table | ubareos
public | pathvisibility | table | ubareos
public | pool | table | ubareos
public | quota | table | ubareos
public | restoreobject | table | ubareos
public | status | table | ubareos
public | storage | table | ubareos
public | tapealerts | table | postgres
public | unsavedfiles | table | ubareos
public | version | table | ubareos

Jörg Steffens

unread,
Dec 19, 2014, 12:25:14 PM12/19/14
to bareos...@googlegroups.com
Hi,

okay, thanks for the hint.
In earlier versions, the postgres database is created with owner
"postgres". The dbconfig mechanism creates a database owned by the
Bareos database user.
The migration to dbconfig does not catch this.

I've filed a bug report at https://bugs.bareos.org/view.php?id=380
and will take care of this in the next days.

For now, you have to run the script
su - postgres /usr/lib/bareos/scripts/grant_bareos_privileges
to set the permissions manually, as in the Bareos versions before.

Attention: I see in your logs, that you using the non default database
user "ubareos". Maybe you also using a non-standard database name.

Make sure, that the postgres user can read /etc/bareos/bareos-dir.conf,
so that

su - postgres -c "/usr/sbin/bareos-dbcheck -B -c
/etc/bareos/bareos-dir.conf"

gives you the catalog configuration. Otherwise you must set
db_user=ubareos, ... as defined in
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#CatMaintenanceManualConfiguration

regards,
Jörg


Reply all
Reply to author
Forward
0 new messages