On 7/7/23 19:26, Phil Stracchino wrote:
On 7/7/23 18:59, Ken Mandelberg wrote:
The suggestion below which is essentially to run "update_mysql_tables"
manually instead of within the

    "apt-get install bacula-mysql"

runs into the same issue. Specifically

Update of Bacula MySQL tables from 16 to 1017 succeeded.
Update of Bacula MySQL tables from 1017 to 1018 succeeded.
Update of Bacula MySQL tables 1018 to 1019 succeeded. (From 16)
Update of Bacula MySQL tables 1019 to 1020 succeeded.
Update of Bacula MySQL tables 1020 to 1021 succeeded.
ERROR 1050 (42S01) at line 3: Table 'TagJob' already exists
Update of Bacula MySQL tables 1021 to 1022 failed.

I also tried deleting TagJob and starting again, and then it just moves
on to the next table that already exists. In fact I deleted all the Tag*
tables, and that it complains about the Object table. I suspect it won't
like any.

Any ideas?
OK, the short version is none of those TAG tables are SUPPOSED to exist before database version 1022. That PROBABLY means that you didn't fully clean from a prior update attempt.


So what you can do is drop your bacula DB, *make sure it's empty*, restore it again from your backup copy, connect to mysql, do a SHOW TABLES FROM bacula; and check that the Tag... and Event tables are not in that list.

Then re-update it again, but BEFORE you rerun the updater, find update_mysql_tables_1021_to_1022 and change every instance of CREATE TABLE to CREATE TABLE IF NOT EXISTS. That will make sure that if something else is happening along the way that is creating those tables before they're expected, then the CREATE TABLE will be skipped, instead of the script failing.



--
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to