On Dec 20, 2011, at 1:19 PM, David Newman wrote: > bacula 5.2.2, FreeBSD 8.2-RELEASE > > After upgrading bacula-server from 5.0.3 to 5.2.2 using FreeBSD ports > and updating the (PostgreSQL) bacula database, all jobs run fine except > for the final one on the bacula server, the one that dumps the catalog > before making a backup. > > The error looks like this: > > 20-Dec 00:08 nye-dir JobId 8183: shell command: run BeforeJob > "/home/bacula/bin/make_catalog_backup bacula bacula" > 20-Dec 00:08 nye-dir JobId 8183: BeforeJob: pg_dump: SQL command failed > 20-Dec 00:08 nye-dir JobId 8183: BeforeJob: pg_dump: Error message from > server: ERROR: permission denied for relation restore object
This is the key line. The PostgresSQL user, with which the script is connecting to the database, does not have correct permissions on that table. > 20-Dec 00:08 nye-dir JobId 8183: BeforeJob: pg_dump: The command was: > LOCK TABLE public.restoreobject IN ACCESS SHARE MODE > 20-Dec 00:08 nye-dir JobId 8183: Error: Runscript: BeforeJob returned > non-zero status=1. ERR=Child exited with code 1 > > Running the same command manually as user pgsql also fails with the same > permission denied error. If you connect to the database using psql, you'll see something like this (I did the version table) bacula=# \dp version Access privileges Schema | Name | Type | Access privileges | Column access privileges --------+---------+-------+-----------------------+-------------------------- public | version | table | bacula=arwdDxt/bacula | : dan=arwdDxt/bacula (1 row) bacula=# You need to grant permissions on the table appropriately. These commands may be in the upgrade script… or you'll have to do them yourself. Now that the issue is known, others may be able to help. > > I have restarted all bacula and postgresql daemons since the upgrade. I > have not changed any permissions in the /home/bacula directory. > > Thanks in advance for troubleshooting clues. > > dn > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users -- Dan Langille - http://langille.org ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users