OK, Thanks for pointing that out.

How can I correct these errors?

Will it corrupt my database or prevent me from backing up and restoring files?

Regards,
Humphrey



________________________________
From: Martin Simmons <mar...@lispworks.com>
Sent: Tuesday, June 1, 2021 10:39 AM
To: Humphrey Bryant <hbry...@fogadaley.com>
Cc: ph...@caerllewys.net <ph...@caerllewys.net>; 
bacula-users@lists.sourceforge.net <bacula-users@lists.sourceforge.net>
Subject: Re: [Bacula-users] Update of Bacula MySQL tables from 16 to 1017 
failed. [Help!]

These errors might cause errors in use:

> ERROR 1067 (42000) at line 53: Invalid default value for 'EventsInsertTime'
> ERROR 1146 (42S02) at line 66: Table 'bacula.Events' doesn't exist

It looks like commit 48905baa40933ad4bab45b1557b2caa0e4994c5d is also needed
for update_mysql_tables.in.

__Martin


>>>>> On Tue, 1 Jun 2021 15:15:00 +0000, Humphrey Bryant via Bacula-users said:
>
> Hey Phil,
>
> Thank you very much, I deleted the 2 lines that you suggested and ran the 
> script again and it took about 20-30 minutes to update/convert the database 
> successfully, I had to enter my MYSQL password multiple times before its 
> completed.
>
> My Bacula Server is up and running again and I am happy. 🙂
>
> Thanks again, see logs below for reference
>
> [root@baculaserver bacula]# ./update_mysql_tables -u root -p
>
> This script will update a Bacula MySQL database
>  from any from version 12-15 or 1014-1021 to version 1022
>  which is needed to convert from any Bacula Enterprise
>  version 4.0.x or later to version 12.4.x
>  or Bacula Community versions 5.0.x, 5.2.x, 7.4.x, 9.x.x to
>  Community version 11.0
>
> Depending on the current version of your catalog, you may
>  have to run this script multiple times
>
> Enter password:
> Enter password:
> DO NOT BREAK THE SCRIPT AFTER THIS POINT
> DO NOT BREAK THE SCRIPT AFTER THIS POINT
> Update of Bacula MySQL tables from 16 to 1017 succeeded.
> Enter password:
> Enter password:
> Update of Bacula MySQL tables from 1017 to 1018 succeeded.
> Enter password:
> Enter password:
> Update of Bacula MySQL tables 1018 to 1019 succeeded. (From 16)
> Enter password:
> Enter password:
> Update of Bacula MySQL tables 1019 to 1020 succeeded.
> Enter password:
> Enter password:
> Update of Bacula MySQL tables 1020 to 1021 succeeded.
> Enter password:
> Enter password:
> ERROR 1067 (42000) at line 53: Invalid default value for 'EventsInsertTime'
> ERROR 1146 (42S02) at line 66: Table 'bacula.Events' doesn't exist
> Update of Bacula MySQL tables 1021 to 1022 succeeded.
> Enter password:
> [root@baculaserv bacula]#
>
> Regards,
> Humphrey
> ________________________________
> From: Phil Stracchino <ph...@caerllewys.net>
> Sent: Monday, May 31, 2021 10:50 PM
> To: bacula-users@lists.sourceforge.net <bacula-users@lists.sourceforge.net>
> Subject: Re: [Bacula-users] Update of Bacula MySQL tables from 16 to 1017 
> failed. [Help!]
>
> On 5/31/21 3:22 PM, Humphrey Bryant via Bacula-users wrote:
> > Hi All,
> >
> > I had a perfectly good Bacula 9.6.6 Server and upgraded Bacula 9.6.6 to
> > the new Bacula 11.03 and now my bacula-dir will not start. 🙁 Also the
> > database upgrade was not done automatically even though I used
> > slanesh-Bacula REPO to do the upgrade. I tried updating the database
> > manually by running the scripts provided, I'm getting the following error:
> > ERROR 1064 (42000) at line 9: You have an error in your SQL syntax;
> > check the manual that corresponds to your MariaDB server version for the
> > right syntax to use near 'IF EXISTS JobId on File' at line 1
> > Update of Bacula MySQL tables from 16 to 1017 failed.
> >
> > Please see full details below when I run the command to manually update
> > the database.
> > I am currently using MariDB as my database ( I never had any issues with
> > it until now)
> >
> > root@baculaserver bacula]# ./update_mysql_tables -u root -p
> >
> > This script will update a Bacula MySQL database
> >  from any from version 12-15 or 1014-1021 to version 1022
> >  which is needed to convert from any Bacula Enterprise
> >  version 4.0.x or later to version 12.4.x
> >  or Bacula Community versions 5.0.x, 5.2.x, 7.4.x, 9.x.x to
> >  Community version 11.0
> >
> > Depending on the current version of your catalog, you may
> >  have to run this script multiple times
> >
> > Enter password:
> > Enter password:
> > ERROR 1064 (42000) at line 9: You have an error in your SQL syntax;
> > check the manual that corresponds to your MariaDB server version for the
> > right syntax to use near 'IF EXISTS JobId on File' at line 1
> > Update of Bacula MySQL tables from 16 to 1017 failed.
>
>
>
> Humphrey,
> Actually, there is no point to that DROP INDEX operation, because the
> entire table is going to be dropped after its replacement is rebuilt anyway.
>
> What you can (and probably should) do is find the following two lines:
>
> DROP INDEX IF EXISTS JobId on File;
> DROP INDEX IF EXISTS JobId_2 on File;
>
> And, frankly, just delete them.  They serve no purpose.
>
> If you prefer to have those indexes dropped anyway in the script, then
> just delete the words 'IF EXISTS' from these two lines ONLY.  The reason
> they are there is probably a copy-paste error on my part.
>
>
> --
>   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
>
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to