On 2018-03-18 at 12:38:39 Josip Deanovic wrote:

> On Sunday 2018-03-18 12:29:42 Erik P. Olsen wrote:
> > My installation is the following:
> > 
> > Fedora 27 fully upgraded
> > mariadb-10.2.13-2.fc27.x86_64
> > bacula-director-9.0.6-2.fc27.x86_64
> > 
> > I've just upgraded Fedora from 26 to 27 which also did an upgrade of
> > bacula from 7.4.7 to 9.0.6 and therefore I ran update_bacula_tables
> > with success, so everything should be OK.
> > 
> > However, when I attempted a backup I got "ERR=Field 'StartTime' doesn't
> > have a default value". I have been warned that such error might occur
> > and did the following afterwards to try to correct the database:
> > 
> > 1. Stopped bacula
> > 2. dropped the database
> > 3. created the database
> > 4. imported the catalogue from the last backup
> > 5. updated the tables
> > 6. started bacula
> > 
> > Did again a backup but the error was still there. I think it should be
> > possible to add a default value to the 'StartTime' field but since I no
> > nothing about sql programming I am unable to fix it. I hope someone on
> > the list would tell me which commands would do the trick.  
> 
> Check what is the default sql mode in your mysql database.
> I guess that it might look something like:
> sql_mode = 
> 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
> 
> You could set it to what it used to be in the older versions.
> E.g. sql_mode = 'NO_ENGINE_SUBSTITUTION'
> 
> Try that if that database is dedicated for bacula.
> 
> 
Thanks a lot, that did it! I added the statement to my.cnf assuming it will 
stick
forever. I didn't check sql_mode because I don't know how to do it. But I 
suppose it
doesn't matter now that bacula works as a dream :-)
 
-- 
Erik


 

------------------------------------------------------------------------------
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

Reply via email to