Bacula-users

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

2016-09-30 08:30:42
Subject: Re: [Bacula-users] 'Incorrect datetime value' after database update from 12 to 15
From: Kern Sibbald <kern AT sibbald DOT com>
To: Daniel Heitepriem <daniel.heitepriem AT pribas DOT com>, bacula-users AT lists.sourceforge DOT net
Date: Fri, 30 Sep 2016 14:29:32 +0200
This is due to a change in MySQL.  There are various workarounds, the first one to start with is to get the latest 7.4.4 release.
I thought it was fixed in 7.4.2 but maybe it was 7.4.3. 

If that does not resolve the problem there are other ways to get around it.

Best regards,
Kern

On 09/30/2016 08:35 AM, Daniel Heitepriem wrote:
Hi guys,

any thoughts on this ?

Thanks and regards,
Daniel Heitepriem

Am 20.09.16 um 12:01 schrieb Daniel Heitepriem:
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@...:~/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@...:~/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.


------------------------------------------------------------------------------


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


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