[pkg-bacula-devel] Bug#679855: bacula-director-mysql: update_mysql_tables does not use dbname when applying SQL update commands
Dominik Sommer
dominik at sommer.name
Tue Jul 3 11:21:50 UTC 2012
On 03.07.2012 09:24, Alexander Golovko wrote:
> On Mon, 02 Jul 2012 23:30:48 +0200, Dominik Sommer wrote:
> Your log look like dbconfig-common was disabled.
>
> Does /etc/dbconfig-common/bacula-director-mysql.conf contain next line?
> dbc_upgrade='false'
No, it reads:
dbc_upgrade=''
> and what output of "debconf-show bacula-director-mysql"?
Nothing, it just returns to the commandline.
> If i don't wrong, than database upgrade with dbconfig-common was
> disabled and it is normal, that database need to be updated manually.
That's ok. It would just be convenient to get some kind of alert during
the package update, like "Don't forget to update the database. Press ok
to continue".
I only noticed bacula-dir was not running when the backup mails stopped,
and only noticed I had to update the DB when I couldn't start
bacula-dir. Moreover, I only got the right hint after running bacula-dir
on the commandline directly, without the init.d script. Had I had a
notice during the update, that would have been a shortcut.
>> Regarding 2., yes I used /usr/share/bacula-director/update_mysql_tables
>> for the DB update. The primary reason for the bug report was the error
>> in line 24 of that script - here's how it looked like:
>>
>> if mysql $* -f <<END-OF-DATA
>> CREATE TABLE RestoreObject (
>>
>> And this is how it should be:
>>
>> if mysql $* -D ${db_name} -f <<END-OF-DATA
>> CREATE TABLE RestoreObject (
>>
>> My bacula works again, so I'm fine now. Just wanted to contribute this
>> bugfix ;-)
>
> Ok, i understand you, this is because we concentrate on automatic
> database manage with dbconfig-common.
>
> Will be enough to run script in next maneer?
> /usr/share/bacula-director/update_mysql_tables -D <database>
I personally don't mind setting the config parameter in the update
script itself. Setting the DB via parameter would definitively be a plus.
The ultimate solution would be getting the DB config from
/etc/bacula/bacula-dir.conf - if you're focusing on the dbconfig-common
path though, that's fine either.
- Dominik
More information about the pkg-bacula-devel
mailing list