Hi William and all,

I have a catalog backup before update.
So I have try this "sql_mode = NO_ENGINE_SUBSTITUTION" because I would like to 
keep version of my distribution (gentoo).
(But if i have to do different, i will do).

The script /usr/libexec/bacula/update_mysql_tables run good:
This script will update a Bacula MySQL database from version 12-15 to 16

Depending on the current version of your catalog,
you may have to run this script multiple times.

Enter password:
Enter password:
Update of Bacula MySQL tables 15 to 16 succeeded.
Enter password:

So I try to do backup, and doesn't work :
28-nov. 16:13 obiwan-dir JobId 0: Fatal error: sql_create.c:84 Create DB Job 
record INSERT INTO Job 
(Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES 
('Backup-tardis.2019-11-28_16.13.50_03','Backup-tardis','B','I','C','2019-11-28 
16:13:48',1574954028,5,'') failed. ERR=Field 'StartTime' doesn't have a default 
value

I don't understand because the script update_mysql_tables remove default value 
?!?

Can you help me ?

Thanks and have a good day !



-----Message d'origine-----
De : William Muriithi <will...@perasotech.com> 
Envoyé : vendredi 22 novembre 2019 16:41
À : Erwan RIGOLLOT <er...@rigollot.eu>; bacula-users@lists.sourceforge.net
Objet : Re: /usr/libexec/bacula/update_mysql_tables


Hi Erwan,

Hope you had made a catalog backup before schema upgrade.

You can't use bacula 9.0 with mysql 8.   mysql made some change that were only 
fixed in a later bacula version, think bacula 9.2.

So if you have to use mysql 8, please use the latest bacula binaries.  
Alternatively, use Mariadb, which would be my advice as it don't change your 
plans at all.  

Also, change the sql mode to match that of earlier versions.  Something like 
this "sql_mode = NO_ENGINE_SUBSTITUTION"

Anyway, all this depends on whether you have a backup.  

Regard,
William  






From: Erwan RIGOLLOT <er...@rigollot.eu>

Sent: November 22, 2019 9:50 AM

To: bacula-users@lists.sourceforge.net <bacula-users@lists.sourceforge.net>

Subject: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

 


Hello,
 
I have try to update bacula database after update Mysql (8.0.17) and bacula ( 
9.0.8-r1).
 
I have get this result and backup don't work .... :
 
 
This script will update a Bacula MySQL database from version 12-15 to 16
 
Depending on the current version of your catalog, you may have to run this 
script multiple times.
 
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1067 (42000) at line 3: Invalid default value for 'FirstWritten'
ERROR 1060 (42S21) at line 4: Duplicate column name 'VolParts'
ERROR 1067 (42000) at line 5: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 6: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 7: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 13: Invalid default value for 'StartTime'
ERROR 1067 (42000) at line 14: Invalid default value for 'SchedTime'
ERROR 1067 (42000) at line 15: Invalid default value for 'SchedTime'
ERROR 1067 (42000) at line 16: Invalid default value for 'SchedTime'
ERROR 1067 (42000) at line 17: Invalid default value for 'StartTime'
ERROR 1067 (42000) at line 18: Invalid default value for 'SchedTime'
ERROR 1067 (42000) at line 19: Invalid default value for 'SchedTime'
ERROR 1067 (42000) at line 20: Invalid default value for 'SchedTime'
ERROR 1067 (42000) at line 23: Invalid default value for 'LastWritten'
ERROR 1067 (42000) at line 24: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 25: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 26: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 29: Invalid default value for 'SchedTime'
Update of Bacula MySQL tables 15 to 16 succeeded.
mysql: [Warning] Using a password on the command line interface can be insecure.
 
 
Thanks,
 
Erwan



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

Reply via email to