Update.... Hmmm. It does seem to be a malformed sql script used in the make_bareos_tables script.
I looked at /usr/lib/bareos/scripts/ddl/creates/mysql.sql file It does have a 'Job' and 'Media' tables but I found the following in the 'Job' creation section: "SchedTime DATETIME DEFAULT 0," I decided to run the CREATE TABLE Job statement in MySQL in the bareos db and it did kick a invalid default value error for SchedTime. The mysql.sql file says: 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)) ); I changed all the datetime references to: DATETIME DEFAULT NOW(), And that cut out most of the errors and got me most of the tables when I ran the make_tables script again. However there still is another error to resolve: ERROR 1171 (42000) at line 379: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead Looking into that issue now. -- You received this message because you are subscribed to the Google Groups "bareos-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
