Bacula-users

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

2016-12-29 19:48:02
Subject: Re: [Bacula-users] 'Incorrect datetime value' after database update from 12 to 15
From: Phil Stracchino <phils AT caerllewys DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 29 Dec 2016 19:31:01 -0500
On 12/29/16 13:25, asari wrote:
> It looks like you are using relatively new MySQL server which has stricter
> policies.
> 
> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes
> 
> My workaround was to dump, sed and restore from backup, i.e.:
> 
> $ sed -e 's/0000-00-00 00:00:00/1970-01-01 00:00:00/g' \
> ...  < /tmp/var/lib/bacula/bacula.sql \
> ...  | mysql -ubacula -p bacula


Well, you COULD do it that way.  Or you could temporarily disable
no-zero-date and no-zero-in-date in SQL_MODE, do a couple of UPDATE
operations to change all 0000-00-00 00:00:00 dates to 1970-01-01
00:00:00, and restore the original SQL_MODE.


-- 
  Phil Stracchino
  Babylon Communications
  phils AT caerllewys DOT net
  phil AT co.ordinate DOT org
  Landline: 603.293.8485

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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>