Re: [Bacula-users] [Non-DoD Source] Re: database upgrade problem

2017-09-03 Thread Kern Sibbald

  
  
Sorry, I see that Phil has answered this in detail.


On 09/03/2017 09:03 AM, Kern Sibbald
  wrote:


  
  For both of you with this issue: it is not possible to respond
  correctly if you do not provide the following information:  1.
  What database server are you using (MySQL, MariaDB, PostgreSQL)? 
  2. What version of that database server are you using?  3. Have
  you modified any of the default parameters of the database server,
  such as requiring strict SQL default specifications.  
  
  Note, if you look through the archives of several months ago
  concerning MySQL in particular you will see that some users have
  modified the basic install parameters of the server and run into
  trouble.
  
  Best regards,
  Kern
  
  On 09/01/2017 11:04 PM, Hicks, Daniel
CTR OSD DMEA wrote:
  
  




  Davide,
   
  I
  am having this same issue. Can you clarify how to make
  sure the catalog upgrade is done. I did the update to
  tables without error but am not sure it is the same. 
   
  Thank
  you
   
  Dan
  Hicks | 916-999-2711
   
  From:
  Davide Franco [mailto:bacula-...@dflc.ch]
  
  Sent: Friday, September 1, 2017 12:11 PM
  To: Jerry Lowry ;
  bacula-users@lists.sourceforge.net
  Subject: [Non-DoD Source] Re: [Bacula-users]
  database upgrade problem
   
  

  Hi Jerry,


   


  Make sure the catalog upgrade has
been done without issue.


   


  This seems to be related to Mariadb.


   


  Good luck


   


  Davide

 

  
On Fri, 1 Sep 2017 at 17:38, Jerry
  Lowry 
  wrote:
  
  

  

  
Hi,
  I finally got my backup server upgraded to
  9..0.3.  I have run the database update and it
  succeeded with out any errors. But I get this
  error any time I start a job:
  
  01-Sep 00:20 kilchis-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
('BackupCatalog.2017-09-01_00.20.18_03','BackupCatalog','B','F','C','2017-09-01
  00:20:16',1504250416,15,'') failed. ERR=Field
  'StartTime' doesn't have a default value
  
  Does
this mean the update did not work?

thanks
  for the help!
  
  jerry

--
  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@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/bacula-users
  

  




--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

  
  


  


--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Non-DoD Source] Re: database upgrade problem

2017-09-03 Thread Kern Sibbald

  
  
For both of you with this issue: it is not possible to respond
correctly if you do not provide the following information:  1. What
database server are you using (MySQL, MariaDB, PostgreSQL)?  2. What
version of that database server are you using?  3. Have you modified
any of the default parameters of the database server, such as
requiring strict SQL default specifications.  

Note, if you look through the archives of several months ago
concerning MySQL in particular you will see that some users have
modified the basic install parameters of the server and run into
trouble.

Best regards,
Kern

On 09/01/2017 11:04 PM, Hicks, Daniel
  CTR OSD DMEA wrote:


  
  
  
  
Davide,
 
I
am having this same issue. Can you clarify how to make sure
the catalog upgrade is done. I did the update to tables
without error but am not sure it is the same. 
 
Thank
you
 
Dan
Hicks | 916-999-2711
 
From:
Davide Franco [mailto:bacula-...@dflc.ch]

Sent: Friday, September 1, 2017 12:11 PM
To: Jerry Lowry ;
bacula-users@lists.sourceforge.net
Subject: [Non-DoD Source] Re: [Bacula-users] database
upgrade problem
 

  
Hi Jerry,
  
  
 
  
  
Make sure the catalog upgrade has been
  done without issue.
  
  
 
  
  
This seems to be related to Mariadb.
  
  
 
  
  
Good luck
  
  
 
  
  
Davide
  
   
  

  On Fri, 1 Sep 2017 at 17:38, Jerry
Lowry 
wrote:


  

  

  Hi,
I finally got my backup server upgraded to
9..0.3.  I have run the database update and it
succeeded with out any errors. But I get this
error any time I start a job:

01-Sep 00:20 kilchis-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
('BackupCatalog.2017-09-01_00.20.18_03','BackupCatalog','B','F','C','2017-09-01
00:20:16',1504250416,15,'') failed. ERR=Field
'StartTime' doesn't have a default value

Does
  this mean the update did not work?
  
  thanks
for the help!

jerry
  
  --
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

  

  
  
  
  
  --
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users



  


--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Non-DoD Source] Re: database upgrade problem

2017-09-01 Thread Phil Stracchino
On 09/01/17 21:50, Jerry Lowry wrote:
> 
> Okay, on the one system that I upgraded to 9.0.3 I also upgraded the
> database engine to mariadb 12.2.8.  Was still getting the error.  I then
> went back to the July email and saw that they removed the
> |STRICT_TRANS_TABLES|
> 
> from the sql_modes.  I remove this and yes it does work now.
> 
> What will this affect on the whole of Bacula though?  Will this cause
> problems down the road?

I haven't run into any other issues yet.  At least, not any
database-related ones.


-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Non-DoD Source] Re: database upgrade problem

2017-09-01 Thread Jerry Lowry
Okay, on the one system that I upgraded to 9.0.3 I also upgraded the
database engine to mariadb 12.2.8.  Was still getting the error.  I then
went back to the July email and saw that they removed the
STRICT_TRANS_TABLES

from the sql_modes.  I remove this and yes it does work now.

What will this affect on the whole of Bacula though?  Will this cause
problems down the road?

thanks,

Jerry

Now on to the other system, half way to a weekend :)

On Fri, Sep 1, 2017 at 5:15 PM, Phil Stracchino 
wrote:

> On 09/01/17 19:10, Jerry Lowry wrote:
> >
> > I am running 5.6.28 on one of my updated servers.  Once I updated the
> > bacula database and got it all running.  I tried to start a job and it
> > failed with this error.  Do you know if it is 5.6 or 5.6.x where the
> > problem started?  There are no sql_modes for date specified any where in
> > the configuration.
>
> Jerry, I *thought* it was 5.7 but my memory could be in error.
>
> If in doubt, check what the global SQL_MODE is *in your running DB*.  If
> you haven't got it set explicitly in your configuration, you're running
> on the compiled-in default.
>
>
> --
>   Phil Stracchino
>   Babylon Communications
>   ph...@caerllewys.net
>   p...@co.ordinate.org
>   Landline: +1.603.293.8485
>   Mobile:   +1.603.998.6958
>
--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Non-DoD Source] Re: database upgrade problem

2017-09-01 Thread Phil Stracchino
On 09/01/17 17:28, Davide Franco wrote:
> Do you use MySQL or MariaDb ?
> 
> It is something related to default value for datetime fields.
> 
> MariaDb does not accept 0 or Null ( I don't remember). You need the
> check previous thread in this mailing list.


This is correct, it is not a MariaDB vs. MySQL issue, it is a
MariaDB/MySQL *version* issue.  MySQL 5.6 and older allowed DATETIME and
TIMESTAMP fields to have the value 0, which is technically not valid for
those datatypes.  MySQL 5.7 and MariaDB 10.2, as configured out of the
box, enforce validity of DATETIME and TIMESTAMP types, and do not allow
them to be 0 or to contain zero year, month or day fields (since there
is no year 0, month 0, or day 0).[1]


There is a simple configuration fix for this that does not require any
changes to Bacula or your Catalog:

1.  Log into your database.
2.  SELECT @@GLOBAL.SQL_MODE;
3.  SET GLOBAL SQL_MODE='new value';

...Where you get the new SQL_MODE by REMOVING the modes NO_ZERO_DATE and
NO_ZERO_IN_DATE from whatever SQL_MODE you got in step 2.  Or, you can
skip 2 and just set SQL_MODE to something reasonable like
'STRICT_ALL_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'.

Make sure that you set this both in the running database instance and in
your configuration files, and of course do the same on any replication
slaves.  Make sure you check ALL POSSIBLE config files for the SQL_MODE
setting.  Sometimes you will find it in unexpected places like /auto.cnf.  For safety, restart your database and make certain
that after restart, SQL_MODE is set to what you want it to be.

Once you have done this, you should have no further problems with the
Bacula catalog and zero values.



[1]  Zeros in the time part are fine, because hours are 0-23, minutes
are 0-59, and seconds are 0-60 (because leap seconds).


-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Non-DoD Source] Re: database upgrade problem

2017-09-01 Thread Davide Franco
Do you use MySQL or MariaDb ?

It is something related to default value for datetime fields.

MariaDb does not accept 0 or Null ( I don't remember). You need the check
previous thread in this mailing list.

To fix the problem you need to update the database schema manually, or find
someone who produce a patch.

Hope this help.

Regards

On Fri, 1 Sep 2017 at 23:04, Hicks, Daniel CTR OSD DMEA <
daniel.hicks@dmea.osd.mil> wrote:

> Davide,
>
>
>
> I am having this same issue. Can you clarify how to make sure the catalog
> upgrade is done. I did the update to tables without error but am not sure
> it is the same.
>
>
>
> Thank you
>
>
>
> Dan Hicks | 916-999-2711
>
>
>
> *From:* Davide Franco [mailto:bacula-...@dflc.ch]
> *Sent:* Friday, September 1, 2017 12:11 PM
> *To:* Jerry Lowry ;
> bacula-users@lists.sourceforge.net
> *Subject:* [Non-DoD Source] Re: [Bacula-users] database upgrade problem
>
>
>
> Hi Jerry,
>
>
>
> Make sure the catalog upgrade has been done without issue.
>
>
>
> This seems to be related to Mariadb.
>
>
>
> Good luck
>
>
>
> Davide
>
>
>
> On Fri, 1 Sep 2017 at 17:38, Jerry Lowry  wrote:
>
> Hi,
> I finally got my backup server upgraded to 9..0.3.  I have run the
> database update and it succeeded with out any errors. But I get this error
> any time I start a job:
>
> 01-Sep 00:20 kilchis-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
> ('BackupCatalog.2017-09-01_00.20.18_03','BackupCatalog','B','F','C','2017-09-01
> 00:20:16',1504250416,15,'') failed. ERR=Field 'StartTime' doesn't have a
> default value
>
> Does this mean the update did not work?
>
> thanks for the help!
>
> jerry
>
>
> --
> 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@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Non-DoD Source] Re: database upgrade problem

2017-09-01 Thread Hicks, Daniel CTR OSD DMEA
Davide,

I am having this same issue. Can you clarify how to make sure the catalog 
upgrade is done. I did the update to tables without error but am not sure it is 
the same.

Thank you

Dan Hicks | 916-999-2711

From: Davide Franco [mailto:bacula-...@dflc.ch]
Sent: Friday, September 1, 2017 12:11 PM
To: Jerry Lowry ; bacula-users@lists.sourceforge.net
Subject: [Non-DoD Source] Re: [Bacula-users] database upgrade problem

Hi Jerry,

Make sure the catalog upgrade has been done without issue.

This seems to be related to Mariadb.

Good luck

Davide

On Fri, 1 Sep 2017 at 17:38, Jerry Lowry 
> wrote:
Hi,
I finally got my backup server upgraded to 9..0.3.  I have run the database 
update and it succeeded with out any errors. But I get this error any time I 
start a job:

01-Sep 00:20 kilchis-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 
('BackupCatalog.2017-09-01_00.20.18_03','BackupCatalog','B','F','C','2017-09-01 
00:20:16',1504250416,15,'') failed. ERR=Field 'StartTime' doesn't have a 
default value
Does this mean the update did not work?
thanks for the help!
jerry
--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users