Bacula-users

[Bacula-users] 'Incorrect datetime value' after database update from 12 to 15

2016-09-20 08:01:47
Subject: [Bacula-users] 'Incorrect datetime value' after database update from 12 to 15
From: Daniel Heitepriem <daniel.heitepriem AT pribas DOT com>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 20 Sep 2016 13:59:56 +0200
Hello everyone,

I updated my old bacula database from version 12 (Bacula version 5.0.0) to version 15 (Bacula version 7.4.2) which went more or less without errors (see below):

bacula@backup-host:~/etc$ ./update_mysql_tables -u bacula -p                                                                                                                                                                           
 
This script will update a Bacula MySQL database from version 12-14 to 15
 
Depending on the current version of your catalog,
you may have to run this script multiple times.
 
Enter password:
Enter password:
ERROR 1067 (42000) at line 19: Invalid default value for 'SchedTime'
Update of Bacula MySQL tables from 12 to 13 succeeded.
Enter password:
Enter password:

Update of Bacula MySQL tables from 13 to 14 succeeded.
Enter password:
Enter password:
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 8: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 9: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 29: Invalid default value for 'SchedTime'
Update of Bacula MySQL tables from 14 to 15 succeeded.
Enter password:
bacula@backup-host:~/etc$

After that I tried to restore a file which gave me this error in bconsole:
20-Sep 13:13 backup-host-dir JobId 0: Fatal error: sql_create.c:86 Create DB Job record INSERT INTO Job (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ('RestoreFiles.2016-09-20_13.13.49_03','RestoreFiles','R','F','C','2016-09-20 13:13:43',1474370023,128,'') failed. ERR=Incorrect datetime value: '0000-00-00 00:00:00' for column 'StartTime' at row 1

How can I fix this?
Thanks you very much.
--
Mit freundlichen Gruessen / Best regards
Daniel Heitepriem

pribas GmbH

Valterweg 24-25
65817 Eppstein-Bremthal
Germany

Phone  +49 (0) 6198 57146400
Fax       +49 (0) 6198 57146433
eMail   daniel.heitepriem AT pribas DOT com

Corporate Headquarters: Huenfelden-Dauborn Managing Director: Arnulf Pribas
Registration: Amtsgericht Limburg a. d. Lahn 7HRB874 Tax ID: DE113840457
________________________________________________________________________
This e-mail is confidential. Information in this e-mail is intended for the exclusive use of the individual or entity named above and may constitute information that is privileged or confidential or otherwise protected from disclosure. The information in this e-mail may be read, published, copied and/or forwarded only by the individual or entity named above. Dissemination, distribution, forwarding or copying of this e-mail by anyone other than the intended recipient is prohibited. If you have received this e-mail in error, please notify us immediately by telephone or e-mail and completely delete or destroy any and all disseminated, distributed, forwarded electronic or other copies of the original message and any attachments.


------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] 'Incorrect datetime value' after database update from 12 to 15, Daniel Heitepriem <=