Hello Peter
This is a problem of MySQL 5.7.
There was another question on the list a few days ago with a solution.
Take a look in this link
https://github.com/wanderleihuttel/bacula-utils/blob/master/dicas/mysql_sql-mode.md
Enviado de Motorola Moto X2
Wanderlei Hüttel
Em qui, 3 de mai de 2018 04:57, Peter Grupe <
[email protected]> escreveu:
> Since a few days Bacula isn't able to create new jobs.
>
> I got this error:
>
> 25-Apr 23:15 ftirtaper-dir JobId 0: Fatal error: sql_create.c:90 Create
> DB Job record INSERT INTO Job
> (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment)
> VALUES
> ('Ftirrd02_2-Backup.2018-04-25_23.15.00_53','Ftirrd02_2-Backup','B','F','C','2018-04-25
>
> 23:15:00',1524690900,3,'') failed. ERR=Incorrect datetime value:
> '0000-00-00 00:00:00' for column 'StartTime' at row 1
>
> I run Bacula 7.0.5 with MySQL 5.7.22 on Ubuntu Server 16.04.4 LTS.
>
> I tried to create a table job in a test database with this command from
> make_mysql_tables
>
> CREATE TABLE Job (
> JobId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
> Job TINYBLOB NOT NULL,
> Name TINYBLOB NOT NULL,
> Type BINARY(1) NOT NULL,
> Level BINARY(1) NOT NULL,
> ClientId INTEGER DEFAULT 0 REFERENCES Client,
> JobStatus BINARY(1) NOT NULL,
> SchedTime DATETIME DEFAULT 0,
> StartTime DATETIME DEFAULT 0,
> EndTime DATETIME DEFAULT 0,
> RealEndTime DATETIME DEFAULT 0,
> JobTDate BIGINT UNSIGNED DEFAULT 0,
> VolSessionId INTEGER UNSIGNED DEFAULT 0,
> VolSessionTime INTEGER UNSIGNED DEFAULT 0,
> JobFiles INTEGER UNSIGNED DEFAULT 0,
> JobBytes BIGINT UNSIGNED DEFAULT 0,
> ReadBytes BIGINT UNSIGNED DEFAULT 0,
> JobErrors INTEGER UNSIGNED DEFAULT 0,
> JobMissingFiles INTEGER UNSIGNED DEFAULT 0,
> PoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool,
> FileSetId INTEGER UNSIGNED DEFAULT 0 REFERENCES FileSet,
> PriorJobId INTEGER UNSIGNED DEFAULT 0 REFERENCES Job,
> PurgedFiles TINYINT DEFAULT 0,
> HasBase TINYINT DEFAULT 0,
> HasCache TINYINT DEFAULT 0,
> Reviewed TINYINT DEFAULT 0,
> Comment BLOB,
> PRIMARY KEY(JobId),
> INDEX (Name(128))
> );
>
> It doesn't work. An error occurs:
>
> ERROR 1067 (42000): Invalid default value for 'SchedTime'
>
> When I alter the default value of ShedTime to '1970-01-01 00:00:00' this
> entry works but the error occurs with the next DATETIME entry StartTime.
>
> Could you please help me to overcome this error in Bacula.
>
> Many thanks in advance for your help.
>
> Bye, Peter Grupe
>
> --
> Peter Grupe
> Universität Bremen
> Institut für Fernerkundung
> Otto-Hahn-Alle 1, NW1, U3240
> D-28359 Bremen
>
>
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users